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]

Re: [PATCH] Fix distinction of 32/64bit addresses in MIPS gas


Geoff Keating wrote:
[snip]
> > > > we can't have 64bit addresses in a 32bit object file format,
> > > 
> > > I'm not sure what you mean.  I thought elf32 supported 64-bit addresses
> > > through R_MIPS_64?
> > 
> > MIPS ELF32 has no R_MIPS_64, AFAIK it has no notion of 64bit
> > entities at all.
> 
> Doesn't this work by R_MIPS_64 being a sign-extended 32-bit address?

Reiteration: MIPS ELF32 has no R_MIPS_64.

> You don't get real 64-bit addresses, but you can create 64-bit values
> from 32-bit addresses, useful for a program running on a 64-bit chip
> but being loaded in the 32-bit address space.

It's a property of all 64bit capable MIPS Hardware to sign-extend
32bit addresses, this has nothing to do with the object format.
Tools like gdb have to sign-extend the 32bit addresses theirselves
to keep in sync with the Hardware.


Thiemo


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