From mboxrd@z Thu Jan 1 00:00:00 1970 From: Franz Sirl To: mark@codesourcery.com Cc: binutils@sourceware.cygnus.com Subject: Re: PATCH for uninitialized junk in .dynsym Date: Thu, 01 Jul 1999 00:00:00 -0000 Message-id: <4.2.0.56.19990615163259.0368d260@mail.lauterbach.com> References: <19990613135107N.mitchell@codesourcery.com> X-SW-Source: 1999-q2/msg00253.html At 22:51 13.06.99 , mark@codesourcery.com wrote: >The MIPS back-end uses mips_elf_size_dynamic_sections to create >dynamic symbol table entries for every section in the output file. >These include the .gnu.version, .gnu.version_d, and .gnu.version_r >sections. These sections are removed by >bfd_elfXX_size_dynamic_sections if they are not needed, but the >corresponding dynamic symbol table entries are not removed, resulting >in uninitialized junk in the output file. > >This patch fixes the problem. OK to check in? > >-- >Mark Mitchell mark@codesourcery.com >CodeSourcery, LLC http://www.codesourcery.com > >1999-06-13 Mark Mitchell > > * elflink.h (elf_link_adjust_dynindx): New function. > (elf_link_remove_section_and_adjust_dynindices): Likewise. > (bfd_elf_size_dynamic_sections): Use them. Hi Mark, this patch badly breaks powerpc-linux-gnu, the testsuite log is full of things like that: gcc -g -O2 -fpic -B/home/fsirl/cvsx/binutils/obj/ld/tmpdir/gas/ -I/home/fsirl/cvsx/binutils/ld/testsuite/ld-shared -g -O2 -c /home/fsirl/cvsx/bi nutils/ld/testsuite/ld-shared/main.c -o tmpdir/mainp.o /home/fsirl/cvsx/binutils/obj/ld/ld-new -o tmpdir/shmpnp.so -shared tmpdir/sh1np.o tmpdir/sh2np.o lt-ld-new: bfd assertion fail ../../bfd/elf32-ppc.c:3368 lt-ld-new: bfd assertion fail ../../bfd/elf32-ppc.c:3368 lt-ld-new: bfd assertion fail ../../bfd/elf32-ppc.c:3368 lt-ld-new: bfd assertion fail ../../bfd/elf32-ppc.c:2955 lt-ld-new: bfd assertion fail ../../bfd/elf32-ppc.c:2955 lt-ld-new: bfd assertion fail ../../bfd/elf32-ppc.c:2955 lt-ld-new: bfd assertion fail ../../bfd/elf32-ppc.c:2955 lt-ld-new: bfd assertion fail ../../bfd/elf32-ppc.c:2955 lt-ld-new: bfd assertion fail ../../bfd/elf32-ppc.c:2955 lt-ld-new: bfd assertion fail ../../bfd/elf32-ppc.c:2955 lt-ld-new: bfd assertion fail ../../bfd/elf32-ppc.c:2955 lt-ld-new: bfd assertion fail ../../bfd/elf32-ppc.c:2955 lt-ld-new: bfd assertion fail ../../bfd/elf32-ppc.c:2955 lt-ld-new: bfd assertion fail ../../bfd/elf32-ppc.c:2955 FAIL: shared (PIC main, non PIC so) I dunno if you triggered a bug on PPC or if your patch is at fault. Franz.