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: Ian Lance Taylor <iant at google dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: binutils at sourceware dot org, ccoutant at google dot com
- Date: Mon, 02 Jan 2012 10:26:57 -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> <CAMe9rOpmE6rQQ_Cz8gMatkKNBLCcMovsTqoQ77O_8FzXuwxKTQ@mail.gmail.com>
"H.J. Lu" <hjl.tools@gmail.com> writes:
>>> 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?
Cary, CC'ed, has been working on the incremental linker.
Fundamentally the generic incremental linker code in incremental.cc is
going to have to ask the target for the size of a GOT entry. That is
true under any possible scheme. This could be done by making
Output_data_got a virtual class, or via some other scheme.
Ian