This is the mail archive of the
mailing list for the binutils project.
Re: [RFC PATCH 03/11] MIPS/BFD: Suppress attribute checks for null input
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: "Maciej W. Rozycki" <macro at imgtec dot com>
- Cc: <binutils at sourceware dot org>, Matthew Fortune <Matthew dot Fortune at imgtec dot com>, Daniel Sanders <Daniel dot Sanders at imgtec dot com>
- Date: Tue, 15 Dec 2015 20:51:30 +0000
- Subject: Re: [RFC PATCH 03/11] MIPS/BFD: Suppress attribute checks for null input
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 00 dot 1511200755190 dot 6915 at tp dot orcam dot me dot uk> <alpine dot DEB dot 2 dot 00 dot 1511200815540 dot 6915 at tp dot orcam dot me dot uk>
"Maciej W. Rozycki" <firstname.lastname@example.org> 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.
> * 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.