From f69919f1f995f7ef602a437bf251f05849ba8d4a Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Thu, 17 Jan 2013 12:14:34 +1100 Subject: [PATCH] Basic support for ARM in machine header. --- elftools/elf/elffile.py | 2 ++ elftools/elf/enums.py | 1 + 2 files changed, 3 insertions(+) diff --git a/elftools/elf/elffile.py b/elftools/elf/elffile.py index b70e9dc..51a645d 100644 --- a/elftools/elf/elffile.py +++ b/elftools/elf/elffile.py @@ -155,6 +155,8 @@ class ELFFile(object): return 'x64' elif self['e_machine'] in ('EM_386', 'EM_486'): return 'x86' + elif self['e_machine'] == 'EM_ARM': + return 'ARM' else: return '' diff --git a/elftools/elf/enums.py b/elftools/elf/enums.py index 78302ae..373706c 100644 --- a/elftools/elf/enums.py +++ b/elftools/elf/enums.py @@ -78,6 +78,7 @@ ENUM_E_MACHINE = dict( EM_MIPS=8, EM_S370=9, EM_MIPS_RS4_BE=10, + EM_ARM=40, EM_IA_64=50, EM_X86_64=62, EM_AVR=83, -- 2.30.2