PATCH: PR gold/13507: Gold assumes GOT entry size is the same as ELF class size

H.J. Lu hjl.tools@gmail.com
Mon Jan 2 17:09:00 GMT 2012


On Sat, Dec 17, 2011 at 2:06 PM, Ian Lance Taylor <iant@google.com> wrote:
>
> On Dec 17, 2011 9:11 AM, "H.J. Lu" <hjl.tools@gmail.com> wrote:
>>
>> On Fri, Dec 16, 2011 at 10:32 PM, Ian Lance Taylor <iant@google.com>
>> wrote:
>> > "H.J. Lu" <hjl.tools@gmail.com> writes:
>> >
>> >> Given that it is very unlikely I can remove all dependencies on the ELF
>> >> class from Output_data_got, I will prepare a patch to add a new
>> >> parameter to class templates for GOT entry size.
>> >
>> > OK, I did it for you.  This patch changes Output_data_got to use a
>> > template parameter of got_size rather than size.  I added virtual
>> > functions and adjusted as necessary.  Committed to mainline.
>> >
>> > Ian
>> >
>> >
>>
>> It doesn't work.  target.h has
>>
>> template<int size, bool big_endian>
>> class Sized_target : public Target
>> {
>> ...
>>  virtual Output_data_got<size, big_endian>*
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>  init_got_plt_for_update(Symbol_table*,
>>                          Layout*,
>>                          unsigned int /* got_count */,
>>                          unsigned int /* plt_count */)
>>  { gold_unreachable(); }
>> ...
>>
>> Here ELF class size is used for GOT entry size.
>
> The incremental linker is work in progress.
>

Do you have any suggestions how to address this?

Thanks.

-- 
H.J.



More information about the Binutils mailing list