Struct object::read::RelocationMap
source · pub struct RelocationMap(BTreeMap<u64, RelocationMapEntry>);
Expand description
A map from section offsets to relocation information.
This can be used to apply relocations to a value at a given section offset. This is intended for use with DWARF in relocatable object files, and only supports relocations that are used in DWARF.
Returned by ObjectSection::relocation_map
.
Tuple Fields§
§0: BTreeMap<u64, RelocationMapEntry>
Implementations§
source§impl RelocationMap
impl RelocationMap
sourcepub fn new<'data, 'file, T>(
file: &'file T,
section: &T::Section<'file>,
) -> Result<Self>where
T: Object<'data>,
pub fn new<'data, 'file, T>(
file: &'file T,
section: &T::Section<'file>,
) -> Result<Self>where
T: Object<'data>,
Construct a new relocation map for a section.
Fails if any relocation cannot be added to the map.
You can manually use add
if you need different error handling,
such as to list all errors or to ignore them.
Trait Implementations§
source§impl Debug for RelocationMap
impl Debug for RelocationMap
source§impl Default for RelocationMap
impl Default for RelocationMap
source§fn default() -> RelocationMap
fn default() -> RelocationMap
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RelocationMap
impl RefUnwindSafe for RelocationMap
impl Send for RelocationMap
impl Sync for RelocationMap
impl Unpin for RelocationMap
impl UnwindSafe for RelocationMap
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