I´m trying to compile my source using

/mips-openwrt-linux-gcc

And all go fine, but .. when i check the compiled file ir was made as DATA ENCODING
error !

The binary file is
  7F 45 4C 46 01 [02]   01 00 01 00 00 00 00 00 00 00   
[00] 02 00 08 00   00    00 01 00 40 06 F0 00 00 00 34

It looks that the  ELF type data encoding is not in " little-endian ",
it is as  "big endianness" (MSB type), and cant run ate OpenWRT.

This is the problem, the DATA ENCODING is 02, but for run on OpenWRT it need
be 01 (one) (LSB type), and the offset 0x10 starts at false position as well (because de data encoding error)

All the OpenWRT ELF FIle has DATA ENCONDING 1.


Following the right DATA ENCODING:
  7F 45 4C 46 01 [01] 01 00 01 00 00 00 00 00 00 00
[02] 00 08 00 01  00 00 00 80 4E 00 03 40 00 00 00


How to fix it ? how to compile my source code corretly ?
How it can compile as LSB (little endian) type ?


thanks

(Last edited by dorivalac on 16 Oct 2013, 07:30)