MIPS sign extension of addresses
Maciej W. Rozycki
macro@ds2.pg.gda.pl
Tue Sep 10 09:57:00 GMT 2002
On Tue, 10 Sep 2002, Fred Fish wrote:
> Most of the problems I fixed had to do with the fact that BFD takes
> the 32 bit unsigned addresses from object and executable files, sign
> extends them, and then stores the result as a bfd_vma, which is an
> unsigned 64 bit type (unsigned long long). For example, the unsigned
> 32 bit address 0x80020004 becomes an unsigned 64 bit bfd_vma/CORE_ADDR
> of 0xffffffff80020004. The bfd_vma type is used to define gdb's
> CORE_ADDR types.
Well, that seems the reason of the trouble -- for MIPS addresses in
object and executable files should be treated as signed and bfd_vma should
be a signed type since that's how MIPS works.
The two addresses you quote are indeed equivalent.
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
More information about the Binutils
mailing list