Bad ELF header when mixing MIPS II with MIPS I

Thiemo Seufer ica2_ts@csv.ica.uni-stuttgart.de
Thu Jan 31 21:52:00 GMT 2002


Eric Christopher wrote:
> 
> > 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.
> > 
> 
> Ok. What I thought HJ was complaining was that he had two object files:
> 
> foo.o: Containing mipsI insns only
> crt0.o: Containing some mipsII insns
> 
> Each one had the flags for the particular ISA set (mipsI or mipsII).
> 
> He then linked them together and was surprised when the superset
> (mipsII) was given in the final executable...

He didn't get MIPS II but MIPS I.

> Or was I mistaken in my reading?

BFD doesn't merge the EF_MIPS_ARCH header flag in a sane way.
The ld result simply gets the ISA flag of the first object file
given.


Thiemo



More information about the Binutils mailing list