a patch to set ELF header flags for empty linker output files
Philip Blundell
pb@futuretv.com
Tue Jan 16 01:02:00 GMT 2001
In message < 200101160034.QAA18950@wilson.cygnus.com >, Jim Wilson writes:
>Another alternative is to change bfd_merge_private_bfd_data so that it
>ignores empty input files. Thus we get no error when we link in the
>empty drm.o file even though it has the wrong machine dependent ELF header
>flag bits set.
We used this approach to fix a similar problem on ARM.
/* Check to see if the input BFD actually contains any sections.
If not, its flags may not have been initialised either, but it cannot
actually cause any incompatibility. */
for (sec = ibfd->sections; sec != NULL; sec = sec->next)
{
/* Ignore synthetic glue sections. */
if (strcmp (sec->name, ".glue_7")
&& strcmp (sec->name, ".glue_7t"))
{
null_input_bfd = false;
break;
}
}
if (null_input_bfd)
return true;
p.
More information about the Binutils
mailing list