This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: binutils-2.23.1 linker 8 unexpected failures - Can a GNU Toolchain be trusted?
> On Mon, Dec 3, 2012 at 8:02 AM, Dennis Clarke <dclarke@blastwave.org>
> wrote:
> >
> > After much digging to get a static glibC in Red Hat Enterprise Linux
> Workstation we get
> > the following results which show that ld FAILs[1] some of its tests
> :
> >
>
> Please check ld/ld.og to see what went wrong for each unexpected
> failure.
Looks like ./ld/ld-new: unrecognized option '-Wl,-rpath'
Not sure why that option to gcc is being passed to the linker and then not understood. I would think that anything which is a -Wl,foo passes foo to ld.
That seems easy to solve, this leaves another interesting case :
gcc -B/usr/local/build/binutils-2.23.1_2.6.32-279.14.1.el6.x86_64.001/ld/tmpdir/gas/ -I/usr/local/build/binutils-2.23.1/ld/testsuite/ld-ifunc -mtune=opteron -march=opteron -m64 -g -fpic -Wl,-rpath=/usr/local/lib -Wl,-q -c -mtune=opteron -march=opteron -m64 -g -fpic -Wl,-rpath=/usr/local/lib -Wl,-q -g -c /usr/local/build/binutils-2.23.1/ld/testsuite/ld-ifunc/ifunc-common-1b.c -o tmpdir/ifunc-common-1b.o
Executing on host: sh -c {gcc -B/usr/local/build/binutils-2.23.1_2.6.32-279.14.1.el6.x86_64.001/ld/tmpdir/gas/ -I/usr/local/build/binutils-2.23.1/ld/testsuite/ld-ifunc -mtune=opteron -march=opteron -m64 -g -fpic -Wl,-rpath=/usr/local/lib -Wl,-q -c -mtune=opteron -march=opteron -m64 -g -fpic -Wl,-rpath=/usr/local/lib -Wl,-q -g -c /usr/local/build/binutils-2.23.1/ld/testsuite/ld-ifunc/ifunc-common-1b.c -o tmpdir/ifunc-common-1b.o 2>&1} /dev/null ld.tmp (timeout = 300)
spawn [open ...]^M
/usr/local/build/binutils-2.23.1_2.6.32-279.14.1.el6.x86_64.001/ld/ld-new -m elf_x86_64 -o tmpdir/ifunc-common-1b -dynamic-linker /lib64/ld-linux-x86-64.so.2 /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.4.6/crtbegin.o -L/usr/local/build/binutils-2.23.1/ld/testsuite/ld-ifunc -static tmpdir/ifunc-common-1b.o -lz -ldl -L/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64 --start-group /usr/lib/gcc/x86_64-redhat-linux/4.4.6/libgcc.a /usr/lib/gcc/x86_64-redhat-linux/4.4.6/libgcc_eh.a -lc --end-group /usr/lib/gcc/x86_64-redhat-linux/4.4.6/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/crtn.o
Executing on host: sh -c {/usr/local/build/binutils-2.23.1_2.6.32-279.14.1.el6.x86_64.001/ld/ld-new -m elf_x86_64 -o tmpdir/ifunc-common-1b -dynamic-linker /lib64/ld-linux-x86-64.so.2 /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/crt1.o /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.4.6/crtbegin.o -L/usr/local/build/binutils-2.23.1/ld/testsuite/ld-ifunc -static tmpdir/ifunc-common-1b.o -lz -ldl -L/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64 --start-group /usr/lib/gcc/x86_64-redhat-linux/4.4.6/libgcc.a /usr/lib/gcc/x86_64-redhat-linux/4.4.6/libgcc_eh.a -lc --end-group /usr/lib/gcc/x86_64-redhat-linux/4.4.6/crtend.o /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/crtn.o 2>&1} /dev/null ld.tmp (timeout = 300)
spawn [open ...]^M
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
FAIL: Common symbol override ifunc test 1b
I will go back, rebuild binutils without the -rpath ( which I actually want ) and then see what results I get.
dc