(elf_machine_got_rel): Only add runtime display if needed.
This commit is contained in:
Andreas Jaeger 2000-04-14 00:15:54 +00:00
parent 490a9ab75c
commit 0fc9546475
2 changed files with 10 additions and 4 deletions

View File

@ -2,6 +2,7 @@
* sysdeps/mips/dl-machine.h (__dl_runtime_resolve): Handle symbol * sysdeps/mips/dl-machine.h (__dl_runtime_resolve): Handle symbol
versioning. versioning.
(elf_machine_got_rel): Only add runtime display if needed.
2000-04-13 Andreas Jaeger <aj@suse.de> 2000-04-13 Andreas Jaeger <aj@suse.de>

View File

@ -504,10 +504,15 @@ elf_machine_got_rel (struct link_map *map, int lazy)
generated by gnu ld. Skip these reserved entries from relocation. */ generated by gnu ld. Skip these reserved entries from relocation. */
i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2: 1; i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2: 1;
n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val; n = map->l_info[DT_MIPS (LOCAL_GOTNO)]->d_un.d_val;
/* Add the run-time display to all local got entries. */ /* Add the run-time display to all local got entries if needed. */
while (i < n) if (map->l_addr != 0)
got[i++] += map->l_addr; {
while (i < n)
got[i++] += map->l_addr;
}
else
i = n;
/* Handle global got entries. */ /* Handle global got entries. */
got += n; got += n;
sym = (void *) D_PTR (map, l_info[DT_SYMTAB]); sym = (void *) D_PTR (map, l_info[DT_SYMTAB]);