[PATCH] Fix distinction of 32/64bit addresses in MIPS gas

H . J . Lu hjl@lucon.org
Fri Aug 31 16:44:00 GMT 2001


On Fri, Aug 31, 2001 at 04:29:33PM -0700, Eric Christopher wrote:
> > If I am rightt, the main problem is Thiemo and I want to support a
> > real MIPS ELF ABI, which mostly means dynamic binaries. As the most
> > ELF ABI, the MIPS ABI doesn't really cover static binaries. You can
> > do whatever you want with static binaries. It doesn't really matter
> > if you follow an ABI or not since a static binary is a standalone
> > binary. Let me ask, how many binutils developers are using the
> > current binutils to generate mips dynamic binaries?
> > 
> 
> What do you mean by MIPS ABI? There are:
> 
> o32
> o64
> n32
> eabi
> meabi
> 
> The last two are embedded.  The first, eabi, was designed mostly by

For the embedded, I assume everything is static, you can do whatever
you want. As for the dynamic binaries, you have to do by the book,
at least, when you generate DSOs/executables.

> cygnus and is the abi for most embedded toolchains. The last is a new
> abi designed by MIPS that is very close to n32, but also used for
> embedded.
> 
> What we should probably do for linux (since that seems to be what you
> really care about) is to do one of two things:
> 
> a) take n32, this will ensure that we can deal with sgi programs
> b) take Sys V with the MIPS extensions this is also sane.
> 

n32 is a 32bit ABI for a kerrnel which supports 64bit registers. You
can only use n32 under a 64bit mips kernel or a mips kernel which
save/restore 64bit registers. I don't believe the 32bit Linux mips
kernel saves/restores 64bit registers. That means 32bit Linux/mips has
to use o32. Also I don't know if we want to support n32 in glibc. We
don't support it for ia64 and I doubt we will support it for mips.

If you take a close look at the mips linker codes, most of it is to
deal with dynamic binaries, which was rarely tested before. I guess
Linux/mips is the only platform on which the mips linker gets really
tested, just like the i386 ELF linker/assembler.


H.J.



More information about the Binutils mailing list