Browse Source
Force symbol dynamic if it isn't undefined weak. Generate relative relocation for GOT reference against non-dynamic symbol in PIC to avoid unnecessary dynamic symbols. bfd/ * elf64-x86-64.c (elf_x86_64_link_hash_entry): Add no_finish_dynamic_symbol. (elf_x86_64_link_hash_newfunc): Set no_finish_dynamic_symbol to 0. (elf_x86_64_allocate_dynrelocs): If a symbol isn't undefined weak symbol, don't make it dynamic. (elf_x86_64_relocate_section): If a symbol isn't dynamic in PIC, set no_finish_dynamic_symbol and generate R_X86_64_RELATIVE relocation for GOT reference. (elf_x86_64_finish_dynamic_symbol): Abort if no_finish_dynamic_symbol isn't 0. ld/ * testsuite/ld-x86-64/no-plt.exp: Also check no-plt-1e.nd. * testsuite/ld-x86-64/no-plt-1e.nd: New file.binutils-2_29-branch
5 changed files with 72 additions and 22 deletions
@ -0,0 +1,7 @@ |
|||
#nm: -g -D |
|||
#target: x86_64-*-* |
|||
|
|||
#failif |
|||
#... |
|||
[0-9]+ +T +func |
|||
#... |
|||
Loading…
Reference in new issue