This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: your patch to remove unused sections


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;
 		}
 	    }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]