This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: debug_info strangeness (arm-mingw32ce)
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Danny Backx <danny dot backx at scarlet dot be>
- Cc: binutils <binutils at sourceware dot org>
- Date: Thu, 3 Dec 2009 09:19:09 +1030
- Subject: Re: debug_info strangeness (arm-mingw32ce)
- References: <1258628885.5171.275.camel@pavilion> <20091119120423.GA24438@bubble.grove.modra.org> <1258652224.5171.290.camel@pavilion> <20091119211601.GB24438@bubble.grove.modra.org> <1258907946.5171.322.camel@pavilion> <1259264606.5171.363.camel@pavilion> <20091127010854.GB692@bubble.grove.modra.org> <1259418805.5171.385.camel@pavilion> <20091130101520.GD692@bubble.grove.modra.org> <1259780646.5171.412.camel@pavilion>
On Wed, Dec 02, 2009 at 08:04:06PM +0100, Danny Backx wrote:
> Anyway : in _bfd_coff_final_link (bfd/cofflink.c) around line 900 in
> current binutils head, this code is present :
>
> for (o = abfd->sections; o != NULL; o = o->next)
> {
> for (p = o->map_head.link_order; p != NULL; p = p->next)
> {
> if (p->type == bfd_indirect_link_order
> && bfd_family_coff (p->u.indirect.section->owner))
> {
> sub = p->u.indirect.section->owner;
> if (! bfd_coff_link_output_has_begun (sub, & finfo))
> {
> if (! _bfd_coff_link_input_bfd (&finfo, sub))
> goto error_return;
> sub->output_has_begun = TRUE;
> }
>
> Not being a binutils expert, this code is not easy for me to understand.
>
> What appears to happen is that _bfd_coff_link_input_bfd is not called
> for the .debug_info section of crt3.o, because
> bfd_coff_link_output_has_begun evaluates to false.
_bfd_coff_link_input_bfd is supposed to be called just once for each
input file, and handles all the sections in the file. So your crt3.o
.debug_info section should have been processed when the above loop was
looking at earlier output sections, most likely .text.
--
Alan Modra
Australia Development Lab, IBM