pub struct Section<'a> { /* private fields */ }
Implementations§
§impl Section<'_>
impl Section<'_>
pub fn sizeof_raw_data(&self) -> u32
pub fn sizeof_raw_data(&self) -> u32
Return the size of the data in the section.
pub fn virtual_size(&self) -> u32
pub fn virtual_size(&self) -> u32
Return the size of the data when mapped in memory (should be 0)
pub fn pointerto_raw_data(&self) -> u32
pub fn pointerto_raw_data(&self) -> u32
Offset to the section’s content
pub fn pointerto_relocation(&self) -> u32
pub fn pointerto_relocation(&self) -> u32
Offset to the relocation table
pub fn pointerto_line_numbers(&self) -> u32
pub fn pointerto_line_numbers(&self) -> u32
The file pointer to the beginning of line-number entries for the section.
This is set to zero if there are no COFF line numbers. This value should be zero for an image because COFF debugging information is deprecated and modern debug information relies on the PDB files.
pub fn numberof_relocations(&self) -> u16
pub fn numberof_relocations(&self) -> u16
Number of relocations.
pub fn numberof_line_numbers(&self) -> u16
pub fn numberof_line_numbers(&self) -> u16
Number of line number entries (if any).
pub fn characteristics(&self) -> Characteristics
pub fn characteristics(&self) -> Characteristics
Characteristics of the section: it provides information about the permissions of the section when mapped. It can also provide information about the purpose of the section (contain code, BSS-like, …)
pub fn is_discardable(&self) -> bool
pub fn is_discardable(&self) -> bool
True if the section can be discarded as needed.
This is typically the case for debug-related sections
pub fn has_extended_relocations(&self) -> bool
pub fn has_extended_relocations(&self) -> bool
Whether there is a large number of relocations whose number need to be stored in the virtual address attribute
pub fn relocations(&self) -> Relocations<'_> ⓘ
pub fn relocations(&self) -> Relocations<'_> ⓘ
Iterator over the relocations associated with this section
pub fn comdat_info(&self) -> Option<ComdatInfo<'_>>
pub fn comdat_info(&self) -> Option<ComdatInfo<'_>>
Return comdat infomration (only if the section has the
crate::pe::section::Characteristics::LNK_COMDAT
characteristic)