Struct gimli::read::RelocateReader
source · pub struct RelocateReader<R: Reader<Offset = usize>, T: Relocate<R::Offset>> { /* private fields */ }
Expand description
A Reader
which applies relocations to addresses and offsets.
This is useful for reading sections which contain relocations, such as those in a relocatable object file. It is generally not used for reading sections in an executable file.
Implementations§
Trait Implementations§
source§impl<R: Clone + Reader<Offset = usize>, T: Clone + Relocate<R::Offset>> Clone for RelocateReader<R, T>
impl<R: Clone + Reader<Offset = usize>, T: Clone + Relocate<R::Offset>> Clone for RelocateReader<R, T>
source§fn clone(&self) -> RelocateReader<R, T>
fn clone(&self) -> RelocateReader<R, T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<R: Debug + Reader<Offset = usize>, T: Debug + Relocate<R::Offset>> Debug for RelocateReader<R, T>
impl<R: Debug + Reader<Offset = usize>, T: Debug + Relocate<R::Offset>> Debug for RelocateReader<R, T>
source§impl<R, T> Reader for RelocateReader<R, T>
impl<R, T> Reader for RelocateReader<R, T>
source§fn read_address(&mut self, address_size: u8) -> Result<u64>
fn read_address(&mut self, address_size: u8) -> Result<u64>
Read an address-sized integer, and return it as a
u64
.source§fn read_offset(&mut self, format: Format) -> Result<R::Offset>
fn read_offset(&mut self, format: Format) -> Result<R::Offset>
Parse a word-sized section offset according to the DWARF format.
source§fn read_sized_offset(&mut self, size: u8) -> Result<R::Offset>
fn read_sized_offset(&mut self, size: u8) -> Result<R::Offset>
Parse a section offset of the given size. Read more
source§fn truncate(&mut self, len: Self::Offset) -> Result<()>
fn truncate(&mut self, len: Self::Offset) -> Result<()>
Set the number of bytes remaining to the specified length.
source§fn offset_from(&self, base: &Self) -> Self::Offset
fn offset_from(&self, base: &Self) -> Self::Offset
Return the offset of this reader’s data relative to the start of
the given base reader’s data. Read more
source§fn offset_id(&self) -> ReaderOffsetId
fn offset_id(&self) -> ReaderOffsetId
Return an identifier for the current reader offset.
source§fn lookup_offset_id(&self, id: ReaderOffsetId) -> Option<Self::Offset>
fn lookup_offset_id(&self, id: ReaderOffsetId) -> Option<Self::Offset>
Return the offset corresponding to the given
id
if
it is associated with this reader.source§fn find(&self, byte: u8) -> Result<Self::Offset>
fn find(&self, byte: u8) -> Result<Self::Offset>
Find the index of the first occurrence of the given byte.
The offset of the reader is not changed.
source§fn to_slice(&self) -> Result<Cow<'_, [u8]>>
fn to_slice(&self) -> Result<Cow<'_, [u8]>>
Return all remaining data as a clone-on-write slice. Read more
source§fn to_string(&self) -> Result<Cow<'_, str>>
fn to_string(&self) -> Result<Cow<'_, str>>
Convert all remaining data to a clone-on-write string. Read more
source§fn to_string_lossy(&self) -> Result<Cow<'_, str>>
fn to_string_lossy(&self) -> Result<Cow<'_, str>>
Convert all remaining data to a clone-on-write string, including invalid characters. Read more
source§fn read_u8_array<A>(&mut self) -> Result<A>
fn read_u8_array<A>(&mut self) -> Result<A>
Read a u8 array.
source§fn read_uint(&mut self, n: usize) -> Result<u64>
fn read_uint(&mut self, n: usize) -> Result<u64>
Read an unsigned n-bytes integer u64. Read more
source§fn read_null_terminated_slice(&mut self) -> Result<Self>
fn read_null_terminated_slice(&mut self) -> Result<Self>
Read a null-terminated slice, and return it (excluding the null).
source§fn skip_leb128(&mut self) -> Result<()>
fn skip_leb128(&mut self) -> Result<()>
Skip a LEB128 encoded integer.
source§fn read_uleb128(&mut self) -> Result<u64>
fn read_uleb128(&mut self) -> Result<u64>
Read an unsigned LEB128 encoded integer.
source§fn read_uleb128_u32(&mut self) -> Result<u32>
fn read_uleb128_u32(&mut self) -> Result<u32>
Read an unsigned LEB128 encoded u32.
source§fn read_uleb128_u16(&mut self) -> Result<u16>
fn read_uleb128_u16(&mut self) -> Result<u16>
Read an unsigned LEB128 encoded u16.
source§fn read_sleb128(&mut self) -> Result<i64>
fn read_sleb128(&mut self) -> Result<i64>
Read a signed LEB128 encoded integer.
source§fn read_initial_length(&mut self) -> Result<(Self::Offset, Format)>
fn read_initial_length(&mut self) -> Result<(Self::Offset, Format)>
Read an initial length field. Read more
source§fn read_address_size(&mut self) -> Result<u8>
fn read_address_size(&mut self) -> Result<u8>
Read a byte and validate it as an address size.
Auto Trait Implementations§
impl<R, T> Freeze for RelocateReader<R, T>
impl<R, T> RefUnwindSafe for RelocateReader<R, T>where
R: RefUnwindSafe,
T: RefUnwindSafe,
impl<R, T> Send for RelocateReader<R, T>
impl<R, T> Sync for RelocateReader<R, T>
impl<R, T> Unpin for RelocateReader<R, T>
impl<R, T> UnwindSafe for RelocateReader<R, T>where
R: UnwindSafe,
T: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)