Reputation: 4970
Using objdump
, how do you check if an .obj
is little- or big-endian?
Upvotes: 0
Views: 1849
Reputation: 4920
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
Upvotes: 0
Reputation: 66
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.
Upvotes: 1