This is the mail archive of the binutils@sourceware.org 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: debug_info strangeness (arm-mingw32ce)


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


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