Struct cranelift_module::ModuleReloc
source · pub struct ModuleReloc {
pub offset: CodeOffset,
pub kind: Reloc,
pub name: ModuleExtName,
pub addend: i64,
}
Expand description
A module relocation.
Fields§
§offset: CodeOffset
The offset at which the relocation applies, relative to the containing section.
kind: Reloc
The kind of relocation.
name: ModuleExtName
The external symbol / name to which this relocation refers.
addend: i64
The addend to add to the symbol value.
Implementations§
source§impl ModuleReloc
impl ModuleReloc
sourcepub fn from_mach_reloc(mach_reloc: &MachReloc, func: &Function) -> Self
pub fn from_mach_reloc(mach_reloc: &MachReloc, func: &Function) -> Self
Converts a MachReloc
produced from a Function
into a ModuleReloc
.
Trait Implementations§
source§impl Clone for ModuleReloc
impl Clone for ModuleReloc
source§fn clone(&self) -> ModuleReloc
fn clone(&self) -> ModuleReloc
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 more