From fa46554fdbad22c1925724ce82e20ffccf172baf Mon Sep 17 00:00:00 2001 From: Ulugbek Abdullaev Date: Fri, 29 Oct 2021 18:03:24 +0200 Subject: [PATCH] add latest 'e_machine' mappings: EM_BPF, EM_CSKY, EM_FRV (#376) --- elftools/elf/elffile.py | 5 ++++- elftools/elf/enums.py | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/elftools/elf/elffile.py b/elftools/elf/elffile.py index f248268..e864a16 100644 --- a/elftools/elf/elffile.py +++ b/elftools/elf/elffile.py @@ -467,7 +467,10 @@ class ELFFile(object): 'EM_FT32' : 'FTDI Chip FT32 32-bit RISC', 'EM_MOXIE' : 'Moxie', 'EM_AMDGPU' : 'AMD GPU', - 'EM_RISCV' : 'RISC-V' + 'EM_RISCV' : 'RISC-V', + 'EM_BPF' : 'Linux BPF - in-kernel virtual machine', + 'EM_CSKY' : 'C-SKY', + 'EM_FRV' : 'Fujitsu FR-V' } return architectures.get(self['e_machine'], '') diff --git a/elftools/elf/enums.py b/elftools/elf/enums.py index 6be988c..56636e7 100644 --- a/elftools/elf/enums.py +++ b/elftools/elf/enums.py @@ -254,6 +254,9 @@ ENUM_E_MACHINE = dict( EM_MOXIE = 223, # Moxie processor family EM_AMDGPU = 224, # AMD GPU architecture EM_RISCV = 243, # RISC-V + EM_BPF = 247, # Linux BPF - in-kernel virtual machine + EM_CSKY = 252, # C-SKY + EM_FRV = 0x5441, # Fujitsu FR-V # Reservations # reserved 11-14 Reserved for future use # reserved 16 Reserved for future use -- 2.30.2