Expand description
Represents a symbol found in an executable
Fields
name: String
The symbol’s name.
binary: String
The executable’s name that contains the symbol.
addr: u64
The symbol’s address.
size: u64
The symbol’s size.
Implementations
sourceimpl Symbol
impl Symbol
sourcepub fn new(name: &str, binary: &str, addr: u64, size: u64) -> Self
pub fn new(name: &str, binary: &str, addr: u64, size: u64) -> Self
Creates a new symbol.
Example
use crate::loader::Symbol;
// Creates a symbol for the function main, which is 0x100-byte long and found at address
// 0x12340000 in `binary.elf`.
let symbol = Symbol::new("main", "binary.elf", 0x12340000, 0x100);
Trait Implementations
impl Eq for Symbol
impl StructuralEq for Symbol
impl StructuralPartialEq for Symbol
Auto Trait Implementations
impl RefUnwindSafe for Symbol
impl Send for Symbol
impl Sync for Symbol
impl Unpin for Symbol
impl UnwindSafe for Symbol
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more