This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ret value of bfd_get_sign_extend_vma


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]