Why does mips define elf_backend_sign_extend_vma to true?
David B Anderson
davea@quasar.engr.sgi.com
Tue Aug 7 20:27:00 GMT 2001
Andrew Cagney wrote
|> > Several ABI's have implied sign extension of addresses. MIPS is one.
H . J . Lu wrote
|> Show me where it is documemnted in the 32bit SVR4 MIPS ABI.
You have to know where to look :-)
It's not in the ABI, it's in the hardware.
When running MIPSIII or MIPSIV.
The hardware, on loading a 32bit integer value into a
64 bit integer register, sign-extends to 64 bits.
(for example, with a lw instruction: any 32bit integer
load does this extension)
gdb is simply reflecting the hardware action.
Documented in "See MIPS Run" by Sweetman,1999, page 28 (for example).
|FYI, some programs using bfd are broken on Linux/mips because of this: nm,
Corrections welcome...
David B. Anderson davea@sgi.com danderson@acm.org
More information about the Binutils
mailing list