comparison head/libexec/rtld-elf/amd64/reloc.c @ 481:737774f27543

Update libexec/rtld-elf to @235221
author Aleksandr Rybalko <ray@ddteam.net>
date Thu, 10 May 2012 14:47:51 +0300
parents f2935497fa04
children
comparison
equal deleted inserted replaced
480:31ffb4589c7c 481:737774f27543
20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 * 24 *
25 * $FreeBSD: head/libexec/rtld-elf/amd64/reloc.c 233231 2012-03-20 13:20:49Z kib $ 25 * $FreeBSD: head/libexec/rtld-elf/amd64/reloc.c 234841 2012-04-30 13:31:10Z kib $
26 */ 26 */
27 27
28 /* 28 /*
29 * Dynamic linker for ELF. 29 * Dynamic linker for ELF.
30 * 30 *
130 /* 130 /*
131 * The dynamic loader may be called from a thread, we have 131 * The dynamic loader may be called from a thread, we have
132 * limited amounts of stack available so we cannot use alloca(). 132 * limited amounts of stack available so we cannot use alloca().
133 */ 133 */
134 if (obj != obj_rtld) { 134 if (obj != obj_rtld) {
135 cache = calloc(obj->nchains, sizeof(SymCache)); 135 cache = calloc(obj->dynsymcount, sizeof(SymCache));
136 /* No need to check for NULL here */ 136 /* No need to check for NULL here */
137 } else 137 } else
138 cache = NULL; 138 cache = NULL;
139 139
140 relalim = (const Elf_Rela *) ((caddr_t) obj->rela + obj->relasize); 140 relalim = (const Elf_Rela *) ((caddr_t) obj->rela + obj->relasize);