add support for arm to dwarfdump (#449)
authorlaqieer <laqieer@126.com>
Thu, 27 Oct 2022 20:05:50 +0000 (04:05 +0800)
committerGitHub <noreply@github.com>
Thu, 27 Oct 2022 20:05:50 +0000 (13:05 -0700)
refer to: https://github.com/eliben/pyelftools/pull/445

scripts/dwarfdump.py

index 4050fe5409fca28b4d0b510126960f7da57675bd..0e26a89ea9f0d4ddfeccab6b982ceb9cb638e4af 100644 (file)
@@ -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", "EM_AARCH64": "littleaarch64"}
+        arches = {"EM_386": "i386", "EM_X86_64": "x86-64", "EM_ARM": "littlearm", "EM_AARCH64": "littleaarch64"}
         arch = arches[self.elffile['e_machine']]
         bits = self.elffile.elfclass
         self._emitline("%s:    file format elf%d-%s" % (filename, bits, arch))