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


Some new information, I see that when building the dynamic
linker/loader (part of the glibc build), when using your patch I get
this error that I did not get before.

aarch64-linux-gnu-gcc -mabi=lp64   -nostdlib -nostartfiles -shared -o /home/sellcey/toolchain/obj/glibc64/elf/ld.so.new            \    
          -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Wl,-z,defs       \
          /home/sellcey/toolchain/obj/glibc64/elf/librtld.os -Wl,--version-script=/home/sellcey/toolchain/obj/glibc64/ld.map          \         
          -Wl,-soname=ld-linux-aarch64.so.1                     \
          -Wl,-defsym=_begin=0
/home/sellcey/toolchain/install/lib/gcc/aarch64-linux-gnu/8.0.0/../../../../aarch64-linux-gnu/bin/ld: /home/sellcey/toolchain/obj/glibc64/elf/librtld.os: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `_dl_argv' which may bind externally can not be used when making a shared object; recompile with -fPIC


Steve Ellcey
sellcey@cavium.com


On Tue, 2017-06-20 at 10:50 -0700, Steve Ellcey wrote:
> 
> 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]