[fpc-pascal] Re: Mipsel compilation: changing elf flags?!
Mark Morgan Lloyd
markMLl.fpc-pascal at telemetry.co.uk
Mon Apr 22 09:27:29 CEST 2013
Reinier Olislagers wrote:
>>> Forum user ocye got mipsel binaries, but the ELF flags apparently need
>>> to be changed due to a bug in older Linux kernels.
>>> How can this be done?
>>> In addition, is there perhaps a compiler switch to manage this?
>> Interesting, there was somebody in (I think) fpc-devel a few months ago
>> with similar problems but we all rather went in circles.
>> Since Lemote appears to be using the compiler OK and since I think I've
>> had it running on (a Qemu emulation of) mipsel, I think that the problem
>> is that /some/ kernel builds are expecting a particular ELF header on
>> /some/ machine types.
> Correct. The forum thread links to a thread re failing executables using
> gdd where it appears that (certain?) 2.4 and 2.6 kernels did *not* want
> the MIPS flag set.
>> If OP could identify the correct parameter for ld
>> it might be possible to use fpc's -k option.
> Ok, so we have to dig into ld. Thanks; will pass it on.
There might be something in
http://wiki.lazarus.freepascal.org/Native_MIPS_Systems that will help
since it includes the command lines I used for the cross-compilers etc.,
finding out what variants of binutils could be built was the hardest part.
I was hoping to be able to test the MIPS etc. targets on a fairly
regular basis, but Qemu (running on the systems available here) quite
simply turned out to not be fast enough, and I'm struggling to find time
to revisit getting an SGI system running for big-endian work.
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the fpc-pascal