This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [AArch64] Use SYMBOL_REFERENCES_LOCAL in one symbol check
- From: Steve Ellcey <sellcey at cavium dot com>
- To: Jiong Wang <jiong dot wang at foss dot arm dot com>, Binutils <binutils at sourceware dot org>, Nick Clifton <nickc at redhat dot com>
- Date: Tue, 20 Jun 2017 15:50:26 -0700
- Subject: Re: [AArch64] Use SYMBOL_REFERENCES_LOCAL in one symbol check
- Authentication-results: sourceware.org; auth=none
- Authentication-results: foss.arm.com; dkim=none (message not signed) header.d=none;foss.arm.com; dmarc=none action=none header.from=cavium.com;
- References: <176b0351-5a7d-0b67-2228-8825c9247fc9@foss.arm.com> <1497981047.31950.46.camel@cavium.com>
- Reply-to: sellcey at cavium dot com
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
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