1 year ago

#49488

test-img

Eric Sun

How "readelf --hex-dump" gives little endian output

I am using readelf --hex-dump=<section name> <elf> to get hex dump of a specific section. However, the result is shown as big endian DWORD. Is there a native way to make the output little endian?

Hex dump of section 'PrgCode':
  0x1ffe0000 b0b54ef2 0010cef2 00000168 490507d5 ..N........hI...
  0x1ffe0010 4ff48061 c0f88010 bff34f8f bff36f8f O..a......O...o.
  0x1ffe0020 0021c5f2 2d410a68 4cf22050 cdf62810 .!..-A.hL. P..(.
  0x1ffe0030 92040246 5ebf4cf2 20524a60 4df62812 ...F^.L. RJ`M.(.
  0x1ffe0040 4a604ff6 ff728a60 0b6843f0 200323f0 J`O..r.`.hC. .#.

hexdump

readelf

endianness

0 Answers

Your Answer

Accepted video resources