pub struct Relocations { /* private fields */ }Implementations§
Source§impl Relocations
impl Relocations
pub fn new() -> Self
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self, RelocationsParseError>
pub fn to_file<P: AsRef<Path>>( &self, path: P, ) -> Result<(), RelocationsWriteError>
pub fn add( &mut self, relocation: Relocation, ) -> Result<&mut Relocation, RelocationsError>
pub fn add_call( &mut self, from: u32, to: u32, module: RelocationModule, from_thumb: bool, to_thumb: bool, ) -> Result<&mut Relocation, RelocationsError>
pub fn add_load( &mut self, from: u32, to: u32, addend: i32, module: RelocationModule, ) -> Result<&mut Relocation, RelocationsError>
pub fn get(&self, from: u32) -> Option<&Relocation>
pub fn get_mut(&mut self, from: u32) -> Option<&mut Relocation>
pub fn iter(&self) -> impl Iterator<Item = &Relocation>
pub fn iter_range( &self, range: Range<u32>, ) -> impl Iterator<Item = (&u32, &Relocation)>
Sourcepub fn get_by_to_address(&self, to_address: u32) -> &[u32]
pub fn get_by_to_address(&self, to_address: u32) -> &[u32]
Returns a list of from-addresses for relocations that point to to_address
pub fn remove(&mut self, from: u32) -> Option<Relocation>
Auto Trait Implementations§
impl Freeze for Relocations
impl RefUnwindSafe for Relocations
impl Send for Relocations
impl Sync for Relocations
impl Unpin for Relocations
impl UnsafeUnpin for Relocations
impl UnwindSafe for Relocations
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