[PATCH] Fix distinction of 32/64bit addresses in MIPS gas
Thiemo Seufer
ica2_ts@csv.ica.uni-stuttgart.de
Fri Aug 31 11:46:00 GMT 2001
cgd@broadcom.com 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.
>
> Maybe i'm missing something in what you're saying but...
I'm talking about:
SYSTEM V APPLICATION BINARY INTERFACE
MIPS RISC Processor Supplement
3rd Edition
where no such relocation is defined.
> bfd's elf32-mips.c definitely has some amount of support for
> R_MIPS_64...
It is a relocation from ABI 64, ABI N32 is a variation of it WRT.
Even n32 code does not use R_MIPS_64 or R_MIPS_SUB because it can't
hold a 64bit value in it's relocations (and it has no use for 64bit
anyway).
> As far as I know, we (SiByte) have been using it for ... a while now
> in code that gets compiled with -mips[34] (or similar 8-) -mlong64,
> into elf32 object files...
I saw the comments in elf32-mips.c and hoped nobody actually used
it anyway. It violates every applicable standard.
Can you give a example where R_MIPS_64 is actually needed instead
of R_MIPS_32? If the output is truncated I can't see why R_MIPS_32
(possibly with tweaked content) insn't enough.
Thiemo
More information about the Binutils
mailing list