debug_info strangeness (arm-mingw32ce)
Nick Clifton
nickc@redhat.com
Thu Dec 10 11:59:00 GMT 2009
Hi Danny,
> Then it looks like the check (see above) should not be
> if (! bfd_coff_link_output_has_begun (sub, & finfo))
> but simply
> if (! sub->output_has_begun)
>
> This change makes my simple test magically work :-)
>
> But I wonder about this (in coff-arm.c) :
> /* This piece of machinery exists only to guarantee that the bfd that
> holds
> the glue section is written last.
>
> This does depend on bfd_make_section attaching a new section to the
> end of the section list for the bfd. */
>
> static bfd_boolean
> coff_arm_link_output_has_begun (bfd * sub, struct coff_final_link_info *
> info)
> {
> return (sub->output_has_begun
> || sub == coff_arm_hash_table
> (info->info)->bfd_of_glue_owner);
> }
>
> I don't understand what it means.#
What it is trying to do is to prevent _bfd_coff_link_input_bfd from
being called on the bfd that has been selected to contain the glue
sections. The idea I believe is that this will force the sections in
this bfd to be written out after all the other sections. (The reason
for this is that the size of the glue sections is not known until the
amount of glue code needed is known, and this information will only be
available once all of the input sections have been processed).
Note that be _bfd_coff_link_input_bfd *will* be called on the glue
contain bfd, but only after it has been called on all of the other input
bfd. This is handled by coff_arm_final_link_postscript.
Cheers
Nick
More information about the Binutils
mailing list