pub struct SectionHeader {
pub name: [u8; 8],
pub virtual_size: u32,
pub virtual_address: u32,
pub size_of_raw_data: u32,
pub pointer_to_raw_data: u32,
pub pointer_to_relocations: u32,
pub pointer_to_line_numbers: u32,
pub number_of_relocations: u16,
pub number_of_line_numbers: u16,
pub characteristics: u32,
}Expand description
节头结构
包含 COFF 文件中一个节(Section)的元数据信息,如名称、大小、 位置和属性等。这个结构不包含节的实际数据,只包含描述信息。
Fields§
§name: [u8; 8]节名称,8字节的ASCII字符串,如 “.text”、“.data” 等
virtual_size: u32节在内存中的虚拟大小
virtual_address: u32节在内存中的虚拟地址(RVA)
size_of_raw_data: u32节在文件中的原始数据大小
pointer_to_raw_data: u32节在文件中的偏移地址
pointer_to_relocations: u32重定位表在文件中的偏移地址
pointer_to_line_numbers: u32行号表在文件中的偏移地址
number_of_relocations: u16重定位项的数量
number_of_line_numbers: u16行号项的数量
characteristics: u32节的特征标志,描述节的属性(可读、可写、可执行等)
Implementations§
Source§impl SectionHeader
impl SectionHeader
Trait Implementations§
Source§impl Clone for SectionHeader
impl Clone for SectionHeader
Source§fn clone(&self) -> SectionHeader
fn clone(&self) -> SectionHeader
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SectionHeader
impl Debug for SectionHeader
Source§impl<'de> Deserialize<'de> for SectionHeader
impl<'de> Deserialize<'de> for SectionHeader
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for SectionHeader
impl Serialize for SectionHeader
impl Copy for SectionHeader
Auto Trait Implementations§
impl Freeze for SectionHeader
impl RefUnwindSafe for SectionHeader
impl Send for SectionHeader
impl Sync for SectionHeader
impl Unpin for SectionHeader
impl UnwindSafe for SectionHeader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more