pub struct DynamicLibrary<'a> { /* private fields */ }
Expand description
Dynamic Library Entry An ‘upgraded’ LibraryEntry with the dynamic section resolved.
Implementations§
Source§impl<'a> DynamicLibrary<'a>
impl<'a> DynamicLibrary<'a>
Sourcepub fn initialize(lib: LoadedLibrary<'a>) -> Result<Self, DynamicError>
pub fn initialize(lib: LoadedLibrary<'a>) -> Result<Self, DynamicError>
Try to consume a LoadedLibrary and create a resolved Dynamic view The Dynamic Library will take ownership of the load library as well as store all relevant dynamic sections for easy access and symbol resolution
Sourcepub fn try_find_function(&self, symbol_name: &str) -> Option<&DynRela>
pub fn try_find_function(&self, symbol_name: &str) -> Option<&DynRela>
Finding target function differs on 32 bit and 64 bit. On 64 bit we want to check the addended relocations table only, opposed to the addendless relocations table. Additionally, we will fall back to the plt given it is an addended relocation table.
Sourcepub fn plt_rel(&self) -> Option<&DynamicRelocations<'_>>
pub fn plt_rel(&self) -> Option<&DynamicRelocations<'_>>
Access the plt as a dynamic relocation table if possible can fail if the plt is not available or the plt is with addend
Sourcepub fn plt_rela(&self) -> Option<&DynamicAddendRelocations<'_>>
pub fn plt_rela(&self) -> Option<&DynamicAddendRelocations<'_>>
Access the plt as a dynamic addend relocation table if possible can fail if the plt is not available or the plt is without addend
Sourcepub fn plt(&self) -> Option<&RelocationTable<'_>>
pub fn plt(&self) -> Option<&RelocationTable<'_>>
Access the dynamic libraries plt if available Can be either a DynamicRelocations or DynamicAddendRelocations
Sourcepub fn relocs(&self) -> Option<&DynamicRelocations<'_>>
pub fn relocs(&self) -> Option<&DynamicRelocations<'_>>
Access the dynamic libraries relocations if available
Sourcepub fn addend_relocs(&self) -> Option<&DynamicAddendRelocations<'_>>
pub fn addend_relocs(&self) -> Option<&DynamicAddendRelocations<'_>>
Access the dynamic libraries addend relocations if available
Sourcepub fn symbols(&self) -> Option<&DynamicSymbols<'_>>
pub fn symbols(&self) -> Option<&DynamicSymbols<'_>>
Access the dynamic libraries symbol table if available
Sourcepub fn dyn_section(&self) -> &DynamicSection<'_>
pub fn dyn_section(&self) -> &DynamicSection<'_>
Access the dynamic libraries dynamic section
Sourcepub fn library(&self) -> &LoadedLibrary<'_>
pub fn library(&self) -> &LoadedLibrary<'_>
Access the dynamic libraries backing general loaded library structure capable of providing the name and base address of the in memory
Sourcepub fn string_table(&self) -> &StringTable<'_>
pub fn string_table(&self) -> &StringTable<'_>
Access the dynamic string table