This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: ret value of bfd_get_sign_extend_vma
- From: Thiemo Seufer <ica2_ts at csv dot ica dot uni-stuttgart dot de>
- To: binutils at sources dot redhat dot com
- Date: Mon, 21 Jun 2004 18:28:37 +0200
- Subject: Re: ret value of bfd_get_sign_extend_vma
- References: <40D70032.2050600@kay-mueller.de>
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