This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: elf32-mips breaks binary compatibility
On Tue, Aug 17, 1999 at 06:16:25PM -0400, Ian Lance Taylor wrote:
> It's impractical to tag old binaries, so therefore we have to tag new
> ones. So if Jakub goes and actually implements some Quickstart like
> mechanism not both can use this tag at the same time.
>
> OK. I think we need to talk about this further if we plan to tag new
> binaries. That would put us in the position of adding the new tag
> forever. It would also mean that we could never support existing SGI
> MIPS/ELF shared libraries. Certainly using DT_MIPS_TIME_STAMP is
> inappropriate if we are tagging new binaries.
>
> I think I have some better mechanism for the dynamic linker to detect
> this problem without any tag at all. I'll work on that tomorrow and
> checkout if it's actually implementable.
>
> That would be ideal.
I dumped above mentioned idea for something even simpler. GNU binutils
reseverve two entries in the GOT. Both old and new versions set
got[1] = 0x80000000 to mark binaries build by GNU binutils. We can
extend that and use another bit to mark new executables. Detection then
is trivial like
goodelf = ((got[1] & 0x80000000) == 0
|| (got[1] & 0xc0000000) == 0xc0000000);
Ralf