pub struct PeBuilder { /* private fields */ }Expand description
PE 汇编器构建器
Implementations§
Source§impl PeBuilder
impl PeBuilder
Sourcepub fn architecture(self, arch: Architecture) -> Self
pub fn architecture(self, arch: Architecture) -> Self
设置目标架构
Sourcepub fn subsystem(self, subsystem: SubsystemType) -> Self
pub fn subsystem(self, subsystem: SubsystemType) -> Self
设置子系统类型
Sourcepub fn entry_point(self, entry_point: u32) -> Self
pub fn entry_point(self, entry_point: u32) -> Self
设置入口点地址
Sourcepub fn image_base(self, image_base: u64) -> Self
pub fn image_base(self, image_base: u64) -> Self
设置映像基地址
Sourcepub fn import_function(self, dll_name: &str, function_name: &str) -> Self
pub fn import_function(self, dll_name: &str, function_name: &str) -> Self
导入单个函数
Sourcepub fn import_functions(self, dll_name: &str, function_names: &[&str]) -> Self
pub fn import_functions(self, dll_name: &str, function_names: &[&str]) -> Self
导入多个函数
Sourcepub fn build_header(&self) -> Result<PeHeader, GaiaError>
pub fn build_header(&self) -> Result<PeHeader, GaiaError>
生成 PE 头部信息
Sourcepub fn build_sections(&mut self) -> Vec<PeSection>
pub fn build_sections(&mut self) -> Vec<PeSection>
生成节列表
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PeBuilder
impl RefUnwindSafe for PeBuilder
impl Send for PeBuilder
impl Sync for PeBuilder
impl Unpin for PeBuilder
impl UnwindSafe for PeBuilder
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