소스 검색

Add ElfSection::flags() method

Philipp Oppermann 9 년 전
부모
커밋
05c1cb03e6
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      src/elf_sections.rs

+ 6 - 0
src/elf_sections.rs

@@ -61,6 +61,12 @@ pub struct ElfSection {
     entry_size: u64,
 }
 
+impl ElfSection {
+    pub fn flags(&self) -> ElfSectionFlags {
+        ElfSectionFlags::from_bits_truncate(self.flags)
+    }
+}
+
 #[repr(u32)]
 pub enum ElfSectionType {
     Unused = 0,