[AArch64] Use SYMBOL_REFERENCES_LOCAL in one symbol check
Jiong Wang
jiong.wang@foss.arm.com
Thu Jun 15 15:46:00 GMT 2017
During fixing copy relocation on AArch64, I noticed for some pc-relative
relocations, we want to allow them under PIC mode. However the current
check now looks inaccurate to me. A normal global symbol even defined in
.so can still bind externally in which case pc-relative relocation is not
allowed.
I think SYMBOL_REFERENCES_LOCAL should be used and is more accurate than
the original individual checks..
This patch fixed this.
cross/native binutils/gas/ld/gcc/g++ check OK.
OK for master?
bfd/
2017-06-15 Jiong Wang <jiong.wang@arm.com>
* elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Use
SYMBOL_REFERENCES_LOCAL.
ld/
* testsuite/ld-aarch64/aarch64-elf.exp: Update test name
* testsuite/ld-aarch64/pcrel.s: Add new testcases.
* testsuite/ld-aarch64/pcrel_pic_undefined.d: Update the
expected warnings.
* testsuite/ld-aarch64/pcrel_pic_defined_local.d: Rename ...
* testsuite/ld-aarch64/pcrel_pic_defined.d: ... to this.
Update expected warnings.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix.patch
Type: text/x-patch
Size: 5487 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20170615/2a2a84df/attachment.bin>
More information about the Binutils
mailing list