This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Why does mips define elf_backend_sign_extend_vma to true?
- To: hjl at lucon dot org
- Subject: Re: Why does mips define elf_backend_sign_extend_vma to true?
- From: David B Anderson <davea at quasar dot engr dot sgi dot com>
- Date: Tue, 7 Aug 2001 20:26:20 -0700 (PDT)
- Cc: rth at redhat dot com, gdb at sourceware dot cygnus dot com, binutils at sourceware dot cygnus dot com
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