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 Thu, Apr 07, 2005 at 04:47:05PM -0700, H. J. Lu wrote:
> 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.

That's right, these tests have failed on i960 for quite a while.

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

Not OK.  This is just a hack.  You need to figure out why i960-elf is
trying to emit symbols to removed output sections.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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