From: Nick Desaulniers Date: Sat, 15 Oct 2022 17:42:10 +0000 (-0700) Subject: add support for aarch64 to dwarfdump (#445) X-Git-Tag: v0.30~18 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=57d96635e83a27df05fec32d32b4b432c36b83e0;p=pyelftools.git add support for aarch64 to dwarfdump (#445) llvm-dwarfdump prints elf64-littleaarch64 We probably need more logic to differentiate between big endian (less common) vs little endian (more common), but at least this allows us to use ./scripts/dwarfdump on aarch64 targets now. I probably should have added this to #318 / #317. --- diff --git a/scripts/dwarfdump.py b/scripts/dwarfdump.py index 162af88..4050fe5 100644 --- a/scripts/dwarfdump.py +++ b/scripts/dwarfdump.py @@ -342,7 +342,7 @@ class ReadElf(object): self.elffile = ELFFile(file) self.output = output self._dwarfinfo = self.elffile.get_dwarf_info() - arches = {"EM_386": "i386", "EM_X86_64": "x86-64"} + arches = {"EM_386": "i386", "EM_X86_64": "x86-64", "EM_AARCH64": "littleaarch64"} arch = arches[self.elffile['e_machine']] bits = self.elffile.elfclass self._emitline("%s: file format elf%d-%s" % (filename, bits, arch))