This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: your patch to remove unused sections
- From: "H. J. Lu" <hjl at lucon dot org>
- To: binutils at sources dot redhat dot com
- Date: Thu, 7 Apr 2005 16:47:05 -0700
- Subject: Re: your patch to remove unused sections
- References: <20050407223347.GO29412@bubble.modra.org>
On Fri, Apr 08, 2005 at 08:03:47AM +0930, Alan Modra wrote:
> ..seems to break i960-elf.
>
How many failures were there before my unused section removal patch?
i960-elf doesn't use ELF linker. This patch gets
./ld/ld.log:FAIL: ld-elf/group1
./ld/ld.log:FAIL: ld-elf/merge2
./ld/ld.log:FAIL: ld-elf/warn1
I am not sure if they were ever working.
H.J.
----
2005-04-07 H.J. Lu <hongjiu.lu@intel.com>
* elf.c (swap_out_syms): Handle removed output sections.
--- bfd/elf.c.generic 2005-04-06 14:08:59.000000000 -0700
+++ bfd/elf.c 2005-04-07 16:42:29.252003573 -0700
@@ -5803,7 +5803,10 @@ Unable to find equivalent output section
}
shndx = _bfd_elf_section_from_bfd_section (abfd, sec2);
- BFD_ASSERT (shndx != -1);
+ /* -1 means that the output section has been
+ removed. */
+ if (shndx == -1)
+ shndx = 0;
}
}