Bob
Bob

Reputation: 4970

arm - how to check endianness of an object file

Using objdump, how do you check if an .obj is little- or big-endian?

Upvotes: 0

Views: 1849

Answers (2)

danglingpointer
danglingpointer

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

Koiix
Koiix

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

Related Questions