This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH][GOLD] Attributes section part 1
- From: Ian Lance Taylor <iant at google dot com>
- To: Doug Kwan (éæå) <dougkwan at google dot com>
- Cc: binutils <binutils at sourceware dot org>
- Date: Fri, 04 Dec 2009 08:04:02 -0800
- Subject: Re: [PATCH][GOLD] Attributes section part 1
- References: <498552560912040203n5be5c4a7j3f1c9cc3d605a60c@mail.gmail.com>
"Doug Kwan (éæå)" <dougkwan@google.com> writes:
> --- gold/object.cc 9 Nov 2009 23:07:30 -0000 1.106
> +++ gold/object.cc 4 Dec 2009 09:28:57 -0000
> @@ -250,6 +250,9 @@ Object::handle_split_stack_section(const
> return false;
> }
>
> +// Read the attributes section. This is code common to Sized_relobj
> +// and Sized_dynobj, so we put it into Object.
> +
> // Class Relobj
This new comment seems out of place.
> + // If NAME is the name of an attributes section, return ture.
> + // Otherwise return false.
> + bool
> + handle_attributes_section(const char* name);
s/ture/true/
Actually, change the whole comment:
// Return whether NAME is the name of an attributes section.
But note that there is no function to correspond to this declaration.
Is that function coming later?
> + // Determine what arguments an attribute tag takes.
> + int
> + attribute_arg_type(int tag) const
> + { return this->do_attribute_arg_type(tag); }
> +
> + // Reorder tags during output. By default no reordering is done
> + // and this is the identity function.
> + int
> + attributes_order(int num) const
> + { return this->do_attributes_order(num); }
Please describe the return and parameter values in the comments for
these functions. I can't guess what they mean.
> + // This must be override by the child class if it has target-specific
> + // attributes subsection in the attribute section.
> + virtual int
> + do_attribute_arg_type(int) const
> + { gold_unreachable(); }
s/override/overridden/
This is OK with those changes.
Thanks.
Ian