[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: hpcmips machdep.c compile error
Hi
Chuck Cranor wrote:
>BTW, what do you get when you run "file netbsd" on an HPCMIPS kernel?
>i get:
>
>xbsd[1378]> file ./netbsd
>./netbsd: ELF 32-bit LSB executable, MIPS R3000_BE - invalid byte order,
version 1 MathCoPro/FPU/MAU Required, statically linked, not stripped
>xbsd[1379]>
>
>that's on an i386. with "invalid byte order" i was worried my
>cross-compiler was busted, but i see the kernel you compiled
>generates the same thing. is "file" broken?
I found two files releated this.
src/gnu/dist/include/elf/common.h:
/* Values for e_machine, which identifies the architecture */
#define EM_MIPS 8 /* MIPS R3000 (officially, big-endian
only) */
#define EM_MIPS_RS4_BE 10 /* MIPS R4000 big-endian */
/usr/share/misc/magic:
>>18 leshort 8 MIPS R3000_BE - invalid byte
order,
>>18 leshort 10 MIPS R3000_LE,
>>18 beshort 8 MIPS R3000_BE,
>>18 beshort 10 MIPS R3000_LE - invalid byte
order,
A gcc generate ELF header with machine=08, 00 which means
0x0008 in a lettle endian style and a file command shows
'invalid byte order' acording to the magic file.
I don't know which is correct :-(
Takemura