add support for loongarch64 to dwarfdump (#458)
authorhaomi123 <68223875+haomi123@users.noreply.github.com>
Mon, 30 Jan 2023 16:49:56 +0000 (00:49 +0800)
committerGitHub <noreply@github.com>
Mon, 30 Jan 2023 16:49:56 +0000 (08:49 -0800)
scripts/dwarfdump.py

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