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: Adding MIPS support to GOLD


Rick Mann <rmann@latencyzero.com> writes:

> 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.?

For details you have to read the MIPS ELF ABI, which you can find in
PDF form off of http://sco.com/developers/devspecs/ .

MIPS uses multi-GOT because it only permits 16 bit offsets from a base
register.  That means that if you need a GOT larger than 65536 bytes,
as is true of large programs with lots of global variables, you need
to use more than one GOT.  i386 permits 32 bit offsets from a base
register, so a single GOT is always enough.

Ian


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