I am currently using
radare2 to disassemble a raw ARM binary (bootloader) in little endian format. I used the command
e cfg.bigendian = false to set the endianness, but the
pd command seems to ignore my settings. In particular, I used the following chain of commands:
$ r2 -a arm bootloader.img [0x00000000]> s 0xa48 [0x00000a48]> e cfg.bigendian = false [0x00000a48]> pxw 4 0x00000a48 0xe92d41c0 // This is correct [0x00000a48]> pd 1 0x00000a48 c0412de9 invalid // This is the wrong ordering
When I use the following command:
[0x00000a48]> e cfg.bigendian = true [0x00000a48]> pxw 4 0x00000a48 0xc0412de9 [0x00000a48]> pd 1 0x00000a48 c0412de9 invalid
The byte ordering of pxw changes, but the byte ordering of pd does not.
How do I tell
pd (or any other disassembler command) to assume a certain endianness? I am new to using
radare2, so it might be that I am missing something here - feel free to point out any mistakes.