ret value of bfd_get_sign_extend_vma

Thiemo Seufer ica2_ts@csv.ica.uni-stuttgart.de
Mon Jun 21 16:28:00 GMT 2004


Michael Mueller wrote:
> Can someone explain to me what the return value of function 
> bfd_get_sign_extend_vma means? What the docu says is a mystery to me:
> 
> "Indicates if the target architecture "naturally" sign extends an 
> address. Some architectures implicitly sign extend address values when 
> they are converted to types larger than the size of an address. For 
> instance, bfd_get_start_address() will return an address sign extended 
> to fill a bfd_vma when this is the case."
> 
> How can an address have a sign? I think of an address as an unsigned 
> quantity.

E.g. MIPS addresses are signed. 64bit CPUs running 32bit Code
sign-extend the 32bit address. As a result, there's no need for
a 32bit-mode switch in the CPU, the 32bit address space is simply
the top/bottom 2GB of the 64bit address space.


Thiemo



More information about the Binutils mailing list