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: ld: can not edit toc Invalid operation


 On Sun, Feb 13, Alan Modra wrote:

> On Sun, Feb 13, 2005 at 09:58:21AM +0100, Olaf Hering wrote:
> >  On Sun, Feb 13, Alan Modra wrote:
> > > > /home/abuild/binhead/bin/ld: can not edit toc Invalid operation
> > > 
> > > This is the real error.  The segfault is a consequence of
> > > ppc64elf.em:ppc_before_allocation not calling the elf32.em
> > > before_allocation function.  I guess I should make this a fatal
> > > error..
> > > 
> > > Can you find out why ppc64_elf_edit_toc is returning FALSE?
> > 
> > _bfd_elf_link_read_relocs() returns NULL, line 7018
> 
> Silly me.  It's quite possible to have a toc section that has no
> relocs.
> 
> 	* elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
> 	Skip toc reloc adjust if reloc_count is zero.
> 
> This tidies up the error situation.  I chose to leave most of the errors
> non-fatal, which means we need to continue on with normal processing in
> these functions rather than just returning.
> 
> 	* emultempl/ppc64elf.em (ppc_create_output_section_statements): Make
> 	an error creating fake bfd fatal.
> 	(ppc_before_allocation): Continue on after errors.
> 	(gld${EMULATION_NAME}_finish): Likewise.

That patch fixed it, thanks.


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