On --enable-multiarch configured glibc if I do: elf/ldconfig --version; \ /usr/src/binutils/obj/binutils/strip-new elf/ldconfig; \ elf/ldconfig --version I get: ldconfig (GNU libc) 2.10.90 Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Andreas Jaeger. unexpected reloc type in static binaryAborted Before stripping we have: ... [ 2] .note.gnu.build-id NOTE 0000000000400178 000178 000024 00 A 0 0 4 [ 3] .rela.plt RELA 00000000004001a0 0001a0 000030 18 A 0 5 8 [ 4] .init PROGBITS 00000000004001d0 0001d0 000018 00 AX 0 0 4 [ 5] .plt PROGBITS 00000000004001e8 0001e8 000020 00 AX 0 0 4 ... 1373: 00000000004001d0 0 NOTYPE LOCAL HIDDEN 3 __rela_iplt_end 1374: 00000000006b1030 0 NOTYPE LOCAL HIDDEN 17 __fini_array_end 1375: 00000000004001a0 0 NOTYPE LOCAL HIDDEN 3 __rela_iplt_start after stripping: [ 2] .note.gnu.build-id NOTE 0000000000400178 000178 000024 00 A 0 0 4 [ 3] .plt PROGBITS 00000000004001e8 0001e8 000020 00 AX 0 0 4 [ 4] .rela.plt RELA 0000000000000000 0b6588 000000 18 0 3 8 [ 5] .init PROGBITS 00000000004001d0 0001d0 000018 00 AX 0 0 4 (note non-allocated RELA section) and all 48 bytes between 0x1a0 and 0x1d0 in the file are cleared.
Subject: Bug 10337 CVSROOT: /cvs/src Module name: src Changes by: hjl@sourceware.org 2009-06-27 16:07:10 Modified files: bfd : ChangeLog elf.c ld/testsuite : ChangeLog Added files: ld/testsuite/ld-ifunc: binutils.exp Log message: bfd/ 2009-06-27 H.J. Lu <hongjiu.lu@intel.com> PR ld/10337 * elf.c (bfd_section_from_shdr): Don't change sh_link for SHT_REL/SHT_RELA sections on executable nor shared library. Treat SHT_REL/SHT_RELA sections with sh_link set to SHN_UNDEF as a normal section. ld/testsuite/ 2009-06-27 H.J. Lu <hongjiu.lu@intel.com> PR ld/10337 * ld-ifunc/binutils.exp: New. Patches: http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&r1=1.4673&r2=1.4674 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/elf.c.diff?cvsroot=src&r1=1.482&r2=1.483 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/ld/testsuite/ChangeLog.diff?cvsroot=src&r1=1.1117&r2=1.1118 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/ld/testsuite/ld-ifunc/binutils.exp.diff?cvsroot=src&r1=NONE&r2=1.1
Fixed.