Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missed some CPU specific section types #559

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions elftools/elf/descriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,10 +458,12 @@ def describe_note_gnu_properties(properties, machine):
SHT_GNU_verneed='VERNEED',
SHT_GNU_versym='VERSYM',
SHT_GNU_LIBLIST='GNU_LIBLIST',
SHT_AMD64_UNWIND='X86_64_UNWIND',
SHT_ARM_EXIDX='ARM_EXIDX',
SHT_ARM_PREEMPTMAP='ARM_PREEMPTMAP',
SHT_ARM_ATTRIBUTES='ARM_ATTRIBUTES',
SHT_ARM_DEBUGOVERLAY='ARM_DEBUGOVERLAY',
SHT_AARCH64_ATTRIBUTES='AARCH64_ATTRIBUTES',
SHT_RISCV_ATTRIBUTES='RISCV_ATTRIBUTES',
SHT_MIPS_LIBLIST='MIPS_LIBLIST',
SHT_MIPS_DEBUG='MIPS_DEBUG',
Expand Down
4 changes: 4 additions & 0 deletions elftools/elf/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,10 @@
SHT_ARM_ATTRIBUTES=0x70000003,
SHT_ARM_DEBUGOVERLAY=0x70000004))

ENUM_SH_TYPE_AARCH64 = merge_dicts(
ENUM_SH_TYPE_BASE,
dict(SHT_AARCH64_ATTRIBUTES=0x70000003))

ENUM_SH_TYPE_RISCV = merge_dicts(
ENUM_SH_TYPE_BASE,
dict(SHT_RISCV_ATTRIBUTES=0x70000003))
Expand Down
2 changes: 2 additions & 0 deletions elftools/elf/structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ def _create_shdr(self):
sh_type_dict = ENUM_SH_TYPE_BASE
if self.e_machine == 'EM_ARM':
sh_type_dict = ENUM_SH_TYPE_ARM
elif self.e_machine == 'EM_AARCH64':
sh_type_dict = ENUM_SH_TYPE_AARCH64
elif self.e_machine == 'EM_X86_64':
sh_type_dict = ENUM_SH_TYPE_AMD64
elif self.e_machine == 'EM_MIPS':
Expand Down
Loading