pub struct ExtFuncData {
pub name: ExternalName,
pub signature: SigRef,
pub colocated: bool,
}Expand description
An external function.
Information about a function that can be called directly with a direct call instruction.
Fields§
§name: ExternalNameName of the external function.
signature: SigRefCall signature of function.
colocated: boolWill this function be defined nearby, such that it will always be a certain distance away, after linking? If so, references to it can avoid going through a GOT or PLT. Note that symbols meant to be preemptible cannot be considered colocated.
If true, some backends may use relocation forms that have limited range. The exact
distance depends on the code model in use. Currently on AArch64, for example, Cranelift
uses a custom code model supporting up to +/- 128MB displacements. If it is unknown how
far away the target will be, it is best not to set the colocated flag; in general, this
flag is best used when the target is known to be in the same unit of code generation, such
as a Wasm module.
See the documentation for RelocDistance for more details. A colocated flag value of
true implies RelocDistance::Near.
Implementations§
Source§impl ExtFuncData
impl ExtFuncData
Sourcepub fn display<'a>(
&'a self,
params: Option<&'a FunctionParameters>,
) -> DisplayableExtFuncData<'a>
pub fn display<'a>( &'a self, params: Option<&'a FunctionParameters>, ) -> DisplayableExtFuncData<'a>
Returns a displayable version of the ExtFuncData, with or without extra context to
prettify the output.
Trait Implementations§
Source§impl Clone for ExtFuncData
impl Clone for ExtFuncData
Source§fn clone(&self) -> ExtFuncData
fn clone(&self) -> ExtFuncData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more