This is the mail archive of the
mailing list for the binutils project.
Re: problem with bfd update from 2001/12/17
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Ralf Habacker <Ralf dot Habacker at freenet dot de>
- Cc: Binutils <binutils at sources dot redhat dot com>
- Date: Fri, 26 Apr 2002 11:31:15 +0930
- Subject: Re: problem with bfd update from 2001/12/17
- References: <001101c1ecba$fe0b9a50$625d07d5@BRAMSCHE>
On Fri, Apr 26, 2002 at 02:40:41AM +0200, Ralf Habacker wrote:
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
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.
IBM OzLabs - Linux Technology Centre