[AArch64] Use SYMBOL_REFERENCES_LOCAL in one symbol check
Steve Ellcey
sellcey@cavium.com
Tue Jun 20 17:50:00 GMT 2017
On Thu, 2017-06-15 at 16:46 +0100, Jiong Wang wrote:
> 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.
Jiong,
This patch is breaking my glibc testing on aarch64. Â I don't understand
exactly why, but if I run a program 'normally' things seem
to work, but if I run the test by explicitly running the dynamic
linker/loader, then the test segfaults. Â This is the way things are
run in the glibc testsuite so that libc and other libraries can be
tested without installing them. Â So, for example, I run a hello world
program like this:
/home/sellcey/toolchain/lib64/ld-2.25.90.so --library-path /home/sellcey/toolchain/lib64 ./x
Then I get a segfault.
If I undo this patch everything works fine. Â If I copy ld-2.25.90.so
and everything from /home/sellcey/toolchain/lib64 to /lib64 and just
run './x' then things seem to work as well, even with your change in
place. Â Any idea on what is going on?
Steve Ellcey
sellcey@cavium.com
More information about the Binutils
mailing list