This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [AArch64] Use SYMBOL_REFERENCES_LOCAL in one symbol check


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]