[PATCH] D16324: [ELF][MIPS] Initial support of MIPS local GOT entries

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 21 06:17:01 PST 2016


On Thu, Jan 21, 2016 at 4:56 PM, Rafael EspĂ­ndola
<rafael.espindola at gmail.com> wrote:
>> I spent a few hours today to experiment that idea to create SymbolBodies for
>> local symbols. Looks like we can do that with a few percent increase in link
>> time, and that would make code much more readable. That's a fair trade-off.
>> So, I'll take care of this part of code complexity.
>
> I would ask that we avoid doing that, at least for now.
>
> SymbolBody exists for symbol resolution. I find it very counter
> intuitive and error prone to create them for things that don't take
> part in symbol resolution. I can take some time to try to generalize
> local in got handling if you want.

A few notes on local GOT entries handling:

1. I do not think that SymbolBody for local symbols solves the problem
because local part of MIPS GOT contains two type of entries. The first
type should be initialized by full symbol value and might be related
to SymbolBody. The second type is initialized by page address i.e.
(value & 0xffff). I do not think it is a good idea to use SymbolBody
for representing in fact arbitrary addresses are not related to any
global or local symbols.

2. IMHO it is too early for GOT handling generalization now. At first
I need to reduce a number of redundant symbols in local part of GOT.
At the second implement TLS relocations handling for MIPS. And finally
implement multi GOT support [1]. I would start to think about
generalization after the first stage or even later.

[1] https://dmz-portal.mips.com/wiki/MIPS_Multi_GOT

-- 
Simon Atanasyan


More information about the llvm-commits mailing list