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: PR gold/13507: Gold assumes GOT entry size is the same as ELF class size


On Fri, Dec 16, 2011 at 10:59 AM, Ian Lance Taylor <iant@google.com> wrote:
>
>>
>> Unless we can remove all dependencies on the ELF class from
>> Output_data_got, I don't see how it will work.
>
> I agree. ?That is exactly what I am suggesting.
>
>
>> Considering there are codes in Output_data_got like
>>
>> ? ? ? ? ? ? Sized_symbol<size>* sgsym;
>> ? ? ? ? ? ? // This cast is a bit ugly. ?We don't want to put a
>> ? ? ? ? ? ? // virtual method in Symbol, because we want Symbol to be
>> ? ? ? ? ? ? // as small as possible.
>> ? ? ? ? ? ? sgsym = static_cast<Sized_symbol<size>*>(gsym);
>> ? ? ? ? ? ? val = sgsym->value();
>>
>> add another template parameter for GOT entry size is less intrusive.
>> FWIW, I enclosed a new patch without adding a template parameter for
>> GOT entry size. ?If it isn't acceptable, I will work on a patch to add
>> a new template parameter, which will be added to most of template
>> classes.
>
> My goal is not the least intrusive change. ?My goal is the change which
> gives us the best source code going forward. ?I'm fairly sure that
> passing in the GOT size as a parameter is not the best change.
>

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.

-- 
H.J.


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