Linux MIPS port: mips or mipsel?
January 25, 2012 20:13:13 Last update: January 25, 2012 20:13:13
The MIPS CPU is able to run both big-endian and little-endian. So a system built on MIPS can be either big-endian (mips) or little-endian (mipsel).
The
but
The
file command shows the architecture:
$ file ls ls: ELF 32-bit LSB executable, MIPS, MIPS32 version 1 (SYSV), dynamically linked (uses shared libs), corrupted section header size
but
readelf will tell the endianness:
$ readelf -h ls ELF Header: Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 Class: ELF32 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: EXEC (Executable file) Machine: MIPS R3000 Version: 0x1 Entry point address: 0x4043a0 Start of program headers: 52 (bytes into file) Start of section headers: 0 (bytes into file) Flags: 0x50001005, noreorder, cpic, o32, mips32 Size of this header: 52 (bytes) Size of program headers: 32 (bytes) Number of program headers: 8 Size of section headers: 0 (bytes) Number of section headers: 0 Section header string table index: 0