From 6a4885f8e0ac840fff26ee99fd6bd8bfa2edaae9 Mon Sep 17 00:00:00 2001 From: tzlil Date: Tue, 21 Mar 2023 16:02:40 +0200 Subject: add missing section types --- src/structs.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/structs.rs b/src/structs.rs index 4757f2a..099e5ee 100644 --- a/src/structs.rs +++ b/src/structs.rs @@ -404,7 +404,12 @@ pub enum ElfSectionType { SHT_SYMTAB section. */ DynSym = 11, + InitArray = 14, + FiniArray = 15, + GnuHash = 0x6FFFFFF6, + VerNeed = 0x6FFFFFFE, + VerSym = 0x6FFFFFFF, } impl std::fmt::Display for ElfSectionType { @@ -422,7 +427,11 @@ impl std::fmt::Display for ElfSectionType { ElfSectionType::Rel => "REL".fmt(formatter), ElfSectionType::ShLib => "SHLIB".fmt(formatter), ElfSectionType::DynSym => "DYNSYM".fmt(formatter), + ElfSectionType::InitArray => "INIT_ARRAY".fmt(formatter), + ElfSectionType::FiniArray => "FINI_ARRAY".fmt(formatter), ElfSectionType::GnuHash => "GNU_HASH".fmt(formatter), + ElfSectionType::VerNeed => "VERNEED".fmt(formatter), + ElfSectionType::VerSym => "VERSYM".fmt(formatter), } } } @@ -441,9 +450,7 @@ bitflags! { // https://github.com/llvm-mirror/llvm/blob/2c4ca6832fa6b306ee6a7010bfb80a3f2596f824/tools/llvm-readobj/ELFDumper.cpp#L1176 impl std::fmt::Display for ElfSectionFlags { fn fmt(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { - // if *self == ElfSectionFlags::WRITE { " A".fmt(formatter); - // } Ok(()) } } -- cgit 1.4.1