Adding MIPS support to GOLD
David Daney
ddaney@avtrex.com
Tue Mar 25 18:13:00 GMT 2008
Rick Mann wrote:
>
> On Mar 25, 2008, at 10:22 AM, David Daney wrote:
>> I was thinking about looking at MIPS support, however I think it may
>> be a bit complicated. The Multi-GOT support is something that does
>> not exist for x86, so it would be completely new. The rest (having
>> not looked at the gold source code yet), I think would be mostly
>> straight forward.
>
>
> I consider myself a fairly expert programmer, but not in the area of
> language tools, and sadly it gets harder for me when looking at
> something like GCC and binutils (I'm really a Mac programmer, using the
> traditional Mac APIs). Is there someplace I can learn about the GOT, why
> multi-GOT exists for MIPS and not for x86, how it's used, etc.?
>
It is a consequence of immediate data being limited to 16 bits in MIPS
ISAs. You can only efficiently access 2^14 GOT/PLT entries. To work
around this problem, ld generates multiple GOTs if required.
> (If you give me a specific task in binutils, I can probably help. If you
> tell me to design something, I need to learn more about the problem
> domain.)
That is a truism. You would probably need to familiarize yourself with
the ELF, and the mips psABI specifications for unix/linux
David Daney
More information about the Binutils
mailing list