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: ExternalName

Name of the external function.

signature: SigRef

Call signature of function.

colocated: bool

Will 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

Return an estimate of the distance to the referred-to function symbol.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.