This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][GOLD] Attributes section part 1


"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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]