[AArch64] Use SYMBOL_REFERENCES_LOCAL in one symbol check
Steve Ellcey
sellcey@cavium.com
Tue Jun 20 22:50:00 GMT 2017
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
More information about the Binutils
mailing list