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.#