Re: [GXemul-users] endianness when loading raw files
Status: Alpha
Brought to you by:
gavare
From: Anders G. <ga...@gm...> - 2009-02-19 18:51:42
|
Hi ew, Tor 2009-02-19 klockan 07:35 +0100 skrev ew: > Is there a way to specify the endianness when loading a raw file ? > I.e., loading a LE elf file via > gxemul-0.4.7.x/gxemul -v -V -E testmips -C 4KEc test.elf > works, while loading the raw binary (created via objdump -o binary) via > gxemul-0.4.7.x/gxemul -v -V -E testmips -C 4KEc 0x80400000:test.bin > does not work because the default mode seems to be big endian. Sorry, there is no simple way (i.e. using the command line). However, if you are using configuration files, you can use byte_order(little) or byte_order(big) to force endianness. http://gavare.se/gxemul/gxemul-stable/doc/configfiles.html#config Or, if you rather feel like hacking the source code, the correct place to change (I think) is MACHINE_SETUP(testmips) { ... cpu->byte_order = EMUL_BIG_ENDIAN; in src/machines/machine_test.c. Anders |