Current glibc git head fails to link with ld from the 2.21 branch > tar xjf ld-bug.tar.bz2 > cd ld-bug/ > ld -m elf_x86_64 -shared -o ./libc.so -e __libc_main -O1 -z defs --version-script=./libc.map -soname=libc.so.6 -z combreloc -z relro ./abi-note.o ./soinit.os --whole-archive ./libc_pic.a --no-whole-archive ./sofini.os ./interp.os ./ld.so -v -T ./shlib.lds GNU ld (GNU Binutils; devel:gcc / openSUSE_11.1) 2.21.0.20110419-45 ld: BFD (GNU Binutils; devel:gcc / openSUSE_11.1) 2.21.0.20110419-45 internal error, aborting at ../../bfd/elf64-x86-64.c line 2764 in elf64_x86_64_relocate_section ld: Please report this bug. I suppose the testcase will be too large for bugzilla, you can fetch it from http://gcc.opensuse.org/ld-bug.tar.bz2 once it is synced there.
ICEs the same way with the 2.21 release. ld 2.16.91.0.5 doesn't grok the linker script. With GNU ld (GNU Binutils; SUSE Linux Enterprise 11) 2.20.0.20100122-0.7.9 it works fine, so it seems to be a regression in 2.21.
Please try binutils mainline.
I don't have mainline around. I have 2.20 around which works and 2.21 and the top of the 2.21 branch which both fail.
Please try: ftp://sourceware.org/pub/binutils/snapshots/binutils-2.21.51.tar.bz2
Why should I? You can try yourself. I want a fix for 2.21.x, not for 2.22+.
Dup. *** This bug has been marked as a duplicate of bug 12366 ***