From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H . J . Lu" To: Thiemo Seufer Cc: binutils@sources.redhat.com Subject: Re: [PATCH] Fix MIPS ELF64 relocation howtos Date: Mon, 27 Aug 2001 12:49:00 -0000 Message-id: <20010827124920.A10972@lucon.org> References: <20010827023751.B301@rembrandt.csv.ica.uni-stuttgart.de> <20010826175030.B2794@lucon.org> <20010827030223.C301@rembrandt.csv.ica.uni-stuttgart.de> <20010827113213.A9485@lucon.org> <20010827204358.C4669@rembrandt.csv.ica.uni-stuttgart.de> <20010827120012.A10036@lucon.org> <20010827214105.E4669@rembrandt.csv.ica.uni-stuttgart.de> X-SW-Source: 2001-08/msg00642.html On Mon, Aug 27, 2001 at 09:41:05PM +0200, Thiemo Seufer wrote: > H . J . Lu wrote: > [snip] > > > This means to use the specification as a guide as long as it's > > > reasonable for Linux. That's my intention, too. > > > > Good. While we are on it, here are things I'd like to see in the new > > `traditional 64bit MIPS ELF ABI': > > > > 1. Make gp callee-saved. > > Ok. We should also use the rest of the NewABI calling conventions. Yes. That makes senses since that is how gcc generates code for the 64bit MIPS ABI. > > > 2. Use RELA relocation if all possible. > > My private patch does so already, and since the ABI draft claims some > essential relocations to be unsupported for REL, this should be used > for all MIPS ELF64 variants. It's the only sane way AFAICS. > > > 3. Use relocations in the SGI 64bit ABI when make senses to us. > > Ok. I made some steps towards this in my private patch for the > _HIGHER and _HIGHEST relocations. > > > 4. Drop support for the MIPS/SGI quickstart. > > Since there is no support for quickstart in binutils: already done. :-) I think there are some strange stuffs in DT_xxxx and symbol tables, which are only used for quickstart. > > > 5. Add support for the glibc prelink. > > This will be an issue when we can do PIC. We should be prepared for that. > > > #1 is a gcc only issue. > > No, we need to handle .cpsetup, .cpreturn and possibly .cplocal > as well as the resulting relocations. Even if we rely on gcc to > expand these .cp*, we have to handle %gp_rel() and %neg(). I see. > > > I think the change to gcc is minimum. That is > > we make sure that we don't use o64 for gcc. #2, #3, #4 and #5 will > > affect binutils. > > I doubt anybody actually uses o64. I found several places in > binutils where it is broken or only partially implemented. I think o64 in gcc may be also broken since noone really tests it. H.J.