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: problem with bfd update from 2001/12/17


On Fri, Apr 26, 2002 at 02:40:41AM +0200, Ralf Habacker wrote:
> http://www.cygwin.com/ml/binutils/2002-04/msg00398.html

I've just been reading the thread, and taking a look to see where
section handling might be broken.  Inspecting source hasn't
revealed anything yet.  :-(

> Additional I have encountered an assert in bfd_map_over_sections(), while
> importing auto-import data.
>   if (i != abfd->section_count)	/* Debugging */
>     abort ();

That's bad.  It indicates that either a section had been added or removed
from abfd without updating section_count, or more likely, that the list
abfd->sections has been corrupted somehow.  When adding the hash table
for fast section lookup, I also added a pointer to the tail of the section
list, for fast addition to the list.  It's likely that the cygwin code
does some section list manipulation without properly adjusting the tail
pointer, then another section is added and the list is broken.

> Do you have an idea or can give me a direction, how to fix this bug ?

Run the linker under gdb, and see if you can find where the section
list is corrupted.  abfd->section->tail ought to always point to a
NULL pointer.

place_orphan is one function you probably want to pay some attention to.
It's been broken before, and the pe.em code is slightly different to
elf32.em.  Of course, you might find a bug that's common to both pe.em
and elf32.em, but just not exposed by the ELF linker.

-- 
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]