[RFC PATCH 03/11] MIPS/BFD: Suppress attribute checks for null input
Richard Sandiford
rdsandiford@googlemail.com
Tue Dec 15 20:51:00 GMT 2015
"Maciej W. Rozycki" <macro@imgtec.com> writes:
> We currently special-case the handling of attribute checks on input
> objects and make them even before we check a given input object actually
> contains any sections. This does not add value as empty objects do not
> cause a compatibility concern and we already make this observation for
> other properties such as ELF file header flags. Moreover the attributes
> themselves are stored in a `.gnu.attributes' section so the absence of
> any section (except from a few special cases) implies there have been no
> attributes provided either. Therefore it is safe to move the attribute
> checks later on, after the null-section check has been made.
>
> bfd/
> * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Suppress
> attribute checks for null input.
Looks good but...
> - /* 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. */
> + /* Check to see if the input BFD actually contains any sections. If not,
> + its flags or attributes may not have been initialised either, but it
> + cannot actually cause any incompatibility. */
...the comment seems a little confusing, since it implies that attributes
might have been initialised. How about:
If not, it has no attributes, and its flags may not have been
initialized either, but it cannot actually cause any incompatibility.
(US spelling: initialized)
OK independently of the rest with that change, thanks.
Richard
More information about the Binutils
mailing list