Bad ELF header when mixing MIPS II with MIPS I

Jason R Thorpe thorpej@wasabisystems.com
Thu Jan 31 13:41:00 GMT 2002


On Thu, Jan 31, 2002 at 12:36:55PM -0800, H . J . Lu wrote:

 > > Where did you get crti.o from? If it has mips II instructions...
 > 
 > It doesn't matter. You can use foo.o which only contains MIPS I
 > instructions.

I agree with H.J. that the resulting executable should reflect the "largest"
ISA of all the objects that make up the executable.  Seems sort of logical,
really.

Consider m68k, where you might mix 68020 objects with cpu32 objects (I'm
not saying you *should*, this is just an example :-).  As I understand it,
the 68020 could execute the cpu32 code, but the cpu32 couldn't necessarily
execute the 68020 code.  So, in that case, you'd want to *clear* the
EF_CPU32 bit in the executable's header.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>



More information about the Binutils mailing list