Using objdump
, how do you check if an .obj
is little- or big-endian?
Asked
Active
Viewed 1,339 times
0

Bob
- 4,576
- 7
- 39
- 107
-
you must clearly mention about the environment where your building. Windows is not mentioned in the question. Are you building arm on your windows machine? – danglingpointer Nov 29 '17 at 13:19
2 Answers
1
So if you run objdump -d <filename>
, you should see at the top of the disassembled code a line that is in this format:
<filename>: file format (string that contains littlearm or bigarm)
I assume that littlearm implies little endian and bigarm implies big endian.

Koiix
- 66
- 7
0
Simple approach is to use the file command that will give you the result what you expect.
$file your_object_file.obj
example output
$firmware.img: Linux jffs2 filesystem data little endian

danglingpointer
- 4,708
- 3
- 24
- 42