Re: elf2ecoff patches for sgimips

Andrew Brown <[email protected]> Tue, 19 Mar 2002 16:15:55 -0500
Newsgroups gmane.os.netbsd.ports.mips
Message-ID <[email protected]>
>> >> This patch didn't change the output (as expected) when run on the pmax.
>> >> No objections from me then.
>> >
>> >OK, thanks for the feedback. I'll commit it.
>> >
>> >Did anyone attempt at making it cross-compile friendly yet ?
>> 
>> i started.  sort of.  i don't even know why.  :)
>> 
>> the problem, as i see it, is (a) it will only emit ECOFF_MAGIC_MIPSEL
>> binaries, (b) it assumes that the input is a little endian binary, and
>> (c) it assumes that the local machine is of the same endianness.
>
>(a) and (b) should be fixed by my commit. I've successfully used it on
>sgimips to make a netbootable kernel, and a boot code for disk.

yay!

>(c) shouldn't be too hard to deal with. The main problem I see it to
>fetch the <sys/exec_elf.h> and related includes from the target instead of
>host.

well...perhaps.  i was thinking more that elf2ecoff would detect *at
run time* the endianness of the host and then decide the endianness of
the target, and then do appropriate swapping on all the members of the
various structures after it read them in (but before it started using
them).  just a thought...

>> which says nothing of any 64 bit needs anyone might have.
>> 
>> that said, i'll be poking at it here and there, but i can't promise
>> anything concrete rsn.
>
>OK, thanks ! I'll tell you if I can get at this.

great.  :)

-- 
|-----< "CODE WARRIOR" >-----|
[email protected]             * "ah!  i see you have the internet
[email protected] (Andrew Brown)                that goes *ping*!"
[email protected]       * "information is power -- share the wealth."