diff options
author | tzlil <tzlils@protonmail.com> | 2023-03-21 16:02:40 +0200 |
---|---|---|
committer | tzlil <tzlils@protonmail.com> | 2023-03-21 16:02:40 +0200 |
commit | 6a4885f8e0ac840fff26ee99fd6bd8bfa2edaae9 (patch) | |
tree | 304833bddc89bd5aa5487a7838a25d96c1d191ae /src/structs.rs | |
parent | 5d8493cf7e2d725fbd2aeca1644f56ebdafd4cf9 (diff) |
add missing section types
Diffstat (limited to 'src/structs.rs')
-rw-r--r-- | src/structs.rs | 11 |
1 files changed, 9 insertions, 2 deletions
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(()) } } |