[binutils-gdb] x86-64: Force symbol dynamic if it isn't undefined weak

sergiodj+buildbot@sergiodj.net sergiodj+buildbot@sergiodj.net
Mon Apr 24 23:08:00 GMT 2017


*** TEST RESULTS FOR COMMIT 9e9821ddd80c0d0b3dda54d34cc8867f256d4583 ***

Author: H.J. Lu <hjl.tools@gmail.com>
Branch: master
Commit: 9e9821ddd80c0d0b3dda54d34cc8867f256d4583

x86-64: Force symbol dynamic if it isn't undefined weak

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.



More information about the Gdb-testers mailing list