Struct wasmtime_environ::wasmparser::RelocationEntry
source · pub struct RelocationEntry {
pub ty: RelocationType,
pub offset: u32,
pub index: u32,
pub addend: i64,
}
Expand description
Single relocation entry within a reloc.*
section, as defined at
https://github.com/WebAssembly/tool-conventions/blob/main/Linking.md#relocation-sections.
Fields§
§ty: RelocationType
Relocation entry type.
offset: u32
Offset in bytes from the start of the section indicated by
RelocSectionReader::section
targetted by this relocation.
index: u32
Index in the symbol table contained in the linking section that
corresponds to the value at offset
.
addend: i64
Addend to add to the address, or 0
if not applicable. The value must
be consistent with the self.ty.addend_kind()
.
Implementations§
source§impl RelocationEntry
impl RelocationEntry
sourcepub fn relocation_range(&self) -> Range<usize> ⓘ
pub fn relocation_range(&self) -> Range<usize> ⓘ
Byte range relative to the start of the section indicated by
RelocSectionReader::section
targetted by this relocation.
Trait Implementations§
source§impl Clone for RelocationEntry
impl Clone for RelocationEntry
source§fn clone(&self) -> RelocationEntry
fn clone(&self) -> RelocationEntry
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 Debug for RelocationEntry
impl Debug for RelocationEntry
source§impl<'a> FromReader<'a> for RelocationEntry
impl<'a> FromReader<'a> for RelocationEntry
source§fn from_reader(
reader: &mut BinaryReader<'a>,
) -> Result<RelocationEntry, BinaryReaderError>
fn from_reader( reader: &mut BinaryReader<'a>, ) -> Result<RelocationEntry, BinaryReaderError>
Attempts to read
Self
from the provided binary reader, returning an
error if it is unable to do so.source§impl Hash for RelocationEntry
impl Hash for RelocationEntry
source§impl PartialEq for RelocationEntry
impl PartialEq for RelocationEntry
impl Copy for RelocationEntry
impl Eq for RelocationEntry
impl StructuralPartialEq for RelocationEntry
Auto Trait Implementations§
impl Freeze for RelocationEntry
impl RefUnwindSafe for RelocationEntry
impl Send for RelocationEntry
impl Sync for RelocationEntry
impl Unpin for RelocationEntry
impl UnwindSafe for RelocationEntry
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.