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: bug: GOLD handling of Sparc PLTREL


David Miller <davem@davemloft.net> writes:

> 2010-02-08  David S. Miller  <davem@davemloft.net>
>
> 	* output.h (Output_data_dynamic::add_section_size): New method
> 	that takes two Output_data objects.
> 	(Output_data_dynamic::Dynamic_entry): Create storage for secondary
> 	entry param.  Handle it in initializers.
> 	* output.cc (Output_data_dynamic::Dynamic_entry::write): For
> 	DYNAMIC_SECTION_SIZE, add in second object size if non-NULL.
> 	* layout.h (Layout::add_target_dynamic_tags): Add dynrel_includes_plt
> 	arg.
> 	* layout.cc (Layout::add_target_dynamic_tags): If dynrel_includes_plt,
> 	and .rela.plt exists, set DT_REL{,A}SZ to sum of .rela.dyn and .rela.plt
> 	* arm.cc (Target_arm::do_finalize_sections): Update to pass false
> 	for dynrel_includes_plt.
> 	* i386.cc (Target_i386::do_finalize_sections): Likewise.
> 	* x86_64.cc (Target_x86_64::do_finalize_sections): Likewise.
> 	* sparc.cc (Target_sparc::make_plt_entry): Force .rela.dyn to be output
> 	before .rela.plt
> 	(Target_sparc::do_finalize_sections): Update to pass true for
> 	dynrel_includes_plt.
> 	* powerpc.cc (Target_powerpc::make_plt_entry): Force .rela.dyn to be
> 	output before .rela.plt
> 	(Target_powerpc::do_finalize_sections): Update to pass true for
> 	dynrel_includes_plt when 32-bit.


> +      if (this->od2)
> +	val += this->od2->data_size();

Write this->od2 != NULL.

> @@ -2045,7 +2051,13 @@ class Output_data_dynamic : public Output_section_data
>  	offset_(section_size
>  		? DYNAMIC_SECTION_SIZE
>  		: DYNAMIC_SECTION_ADDRESS)
> -    { this->u_.od = od; }
> +    { this->u_.od = od; this->od2 = NULL; }

Use two separate lines.

> +    Dynamic_entry(elfcpp::DT tag, const Output_data* od, const Output_data* od2)
> +      : tag_(tag),
> +	offset_(DYNAMIC_SECTION_SIZE)
> +    { this->u_.od = od; this->od2 = od2; }

Here too.


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]