This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: a patch to set ELF header flags for empty linker output files
- To: Jim Wilson <wilson at cygnus dot com>
- Subject: Re: a patch to set ELF header flags for empty linker output files
- From: Philip Blundell <pb at futuretv dot com>
- Date: Tue, 16 Jan 2001 09:00:12 +0000
- cc: binutils at sources dot redhat dot com
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.