This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bad ELF header when mixing MIPS II with MIPS I


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]