binutils-gdb/ld/testsuite/ld-aarch64/pr20402.d
Renlin Li 0c1ded8dc0 [PR20402][LD][AARCH64]Don't emit RELATIVE relocation for absolute symbols which are resolved at static linking time.
For absolute symbols which are forced local or not dynamic, the ABS relocation
should be resolved at static linking time.

Originally, an RELATIVE/ABS relocation will be generated even for absolution
symbols for the dynamic linker to resolve.

bfd/

2018-03-07  Renlin Li  <renlin.li@arm.com>

	PR ld/20402
	* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Check absolute symbol,
	and don't emit relocation in specific case.

ld/

2018-03-07  Renlin Li  <renlin.li@arm.com>

	PR ld/20402
	* testsuite/ld-aarch64/aarch64-elf.exp: Run new test.
	* testsuite/ld-aarch64/pr20402.s: New.
	* testsuite/ld-aarch64/pr20402.d: New.
2018-03-07 14:47:27 +00:00

8 lines
338 B
Makefile

#ld: -pie -defsym foo=0x1 -defsym bar=0x2
#readelf: -r
Relocation section '\.rela\.dyn' at offset .* contains 2 entries:
Offset Info Type Sym\. Value Sym\. Name \+ Addend
000000000000 000000000000 R_AARCH64_NONE 0
000000000000 000000000000 R_AARCH64_NONE 0