From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thiemo Seufer To: binutils@sources.redhat.com Subject: Re: [PATCH] Fix distinction of 32/64bit addresses in MIPS gas Date: Fri, 31 Aug 2001 11:46:00 -0000 Message-id: <20010831204556.C17249@rembrandt.csv.ica.uni-stuttgart.de> References: <20010825032615.E309@rembrandt.csv.ica.uni-stuttgart.de> <20010831181657.A17249@rembrandt.csv.ica.uni-stuttgart.de> <200108311711.KAA19709@geoffk.org> <20010831193107.A10362@rembrandt.csv.ica.uni-stuttgart.de> X-SW-Source: 2001-08/msg00730.html 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