From mboxrd@z Thu Jan 1 00:00:00 1970 From: David B Anderson To: hjl@lucon.org Cc: rth@redhat.com, gdb@sourceware.cygnus.com, binutils@sourceware.cygnus.com Subject: Re: Why does mips define elf_backend_sign_extend_vma to true? Date: Tue, 07 Aug 2001 20:27:00 -0000 Message-id: <200108080326.UAA19167@quasar.engr.sgi.com> X-SW-Source: 2001-08/msg00055.html 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