From bb8d171f34aef97e7f8cdaa245e61bcdd57d34bc Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Wed, 2 Jun 2021 21:07:22 +0200 Subject: [PATCH] elf_mem_map: decode integers with correct endianness --- tools/elf_mem_map | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/elf_mem_map b/tools/elf_mem_map index dc985ab0c..f4d187d10 100755 --- a/tools/elf_mem_map +++ b/tools/elf_mem_map @@ -170,7 +170,7 @@ def annotate_refs(grefs, addr, data, width=45, gaps=True): buf_repr = '' if len(buf) in [1, 2, 4]: # attempt to decode as integers - buf_repr += ' I:' + str(int.from_bytes(buf, 'big')).rjust(10) + buf_repr += ' I:' + str(int.from_bytes(buf, 'little')).rjust(10) if len(buf) in [4, 8]: # attempt to decode as floats typ = 'f' if len(buf) == 4 else 'd'