[PR20402][LD][AARCH64]Don't emit RELATIVE relocation for absolute symbols which are...
authorRenlin Li <renlin.li@arm.com>
Wed, 7 Mar 2018 09:27:45 +0000 (09:27 +0000)
committerRenlin Li <renlin.li@arm.com>
Wed, 7 Mar 2018 14:47:27 +0000 (14:47 +0000)
commit0c1ded8dc0be9c61975e04a0b416b064223f7bda
treeea5508405d2eadfb08c3a9a45c323ee66fcb5915
parente95a97d41a186ac65077ba3103dc10e5d41fe7b5
[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.
bfd/ChangeLog
bfd/elfnn-aarch64.c
ld/ChangeLog
ld/testsuite/ld-aarch64/aarch64-elf.exp
ld/testsuite/ld-aarch64/pr20402.d [new file with mode: 0644]
ld/testsuite/ld-aarch64/pr20402.s [new file with mode: 0644]