extern {
pub type LinkerSymbol;
}
Expand description
LinkerSymbol
is an extern type that represents a symbol defined by the linker. It is entirely opaque to
the Rust type system, and cannot be instantiated, which aims to avoid mistakes where it is taken by value
instead of by reference.
Symbols can be defined with something like, and accessed only via the LinkerSymbol::ptr
method:
ⓘ
extern "C" {
static _stack_top: LinkerSymbol;
}
let stack_top: *const u8 = _stack_top.ptr();