From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Lance Taylor To: mark@codesourcery.com Cc: binutils@sourceware.cygnus.com Subject: Re: PATCH for 64-bit MIPS ELF buglets Date: Mon, 12 Jul 1999 14:09:00 -0000 Message-id: <19990712210830.557.qmail@daffy.airs.com> References: <19990712191858.6381.qmail@daffy.airs.com> <19990712124625I.mitchell@codesourcery.com> <19990712200136.7955.qmail@daffy.airs.com> <19990712134003P.mitchell@codesourcery.com> X-SW-Source: 1999-q3/msg00153.html From: Mark Mitchell Date: Mon, 12 Jul 1999 13:40:03 -0700 Ian> Some of the mips16 stub support seems to have disappeared as Ian> well. That all needs to get restored too. I'll do my best. In retrospect, using R_MIPS_64 for two different relocations was probably not an ideal design choice; in the future, we should probably try to use non-standard relocations names for non-standard relocations. (As you did for R_MIPS_16*.) Actually, I think R_MIPS_64 can be handled as the same relocation, but for the 32 MIPS ELF format you have to do the calculations using strictly 32 bit values. At least, that was my original thinking. However, I admit that the existing code does not work that way. It does a normal 32 bit relocation, and overwrites the upper 32 bits with 32 bits of sign extension. It should probably add the sign extension to the upper 32 bits of the 64 bit value that it finds in the object file. I don't think that making that change would break any existing object files. I certainly agree that a better testsuite would be a significant benefit. As you guessed, though, I'm not likely to do much in this regard myself. There actually is a way to test the code, which is to use the gcc testsuite and a simulator from gdb. It doesn't catch corner cases, but it does catch basic functionality. Ian