This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR gold/13507: Gold assumes GOT entry size is the same as ELF class size
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 2 Jan 2012 09:09:12 -0800
- Subject: Re: PATCH: PR gold/13507: Gold assumes GOT entry size is the same as ELF class size
- References: <20111215230919.GA14342@intel.com> <mcrliqdjl6w.fsf@dhcp-172-18-216-180.mtv.corp.google.com> <CAMe9rOrHv4YEwDXsmVLhFUZA8D7UPvOC28x-rEk8Aba-p4d_Yw@mail.gmail.com> <mcr8vmdjc59.fsf@dhcp-172-18-216-180.mtv.corp.google.com> <CAMe9rOrXivTFYsadrAH_E6SHcPv_gppz0uNCRcxBWPcZ2EMJjA@mail.gmail.com> <mcrpqfoh3h2.fsf@dhcp-172-18-216-180.mtv.corp.google.com> <CAMe9rOocBWBW7mbb_aS=mjUjshv_bSQKkBwkufYdemVQ7FRGbA@mail.gmail.com> <mcrhb10gx5o.fsf@dhcp-172-18-216-180.mtv.corp.google.com> <CAMe9rOoXyFv6ArEW1KWBkocTuh7a_52+7hOi1KaW-vepJm=wXg@mail.gmail.com> <mcr62hfemih.fsf@dhcp-172-18-216-180.mtv.corp.google.com> <CAMe9rOoUDcgWB7BdxtHRSnPGJubCU2Wa0awqwkqeJ5Dq7QOn9w@mail.gmail.com> <CAKOQZ8zjAStMvF0Di2V0tmbXSaJYgOx9uE3tYCW_CDS2n5-AkA@mail.gmail.com>
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.