[PATCH][GOLD] Attributes section part 1
Ian Lance Taylor
iant@google.com
Fri Dec 4 16:04:00 GMT 2009
"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
More information about the Binutils
mailing list