pub struct Global {
pub name: Symbol,
pub size: u64,
pub align: u32,
pub linkage: Linkage,
pub visibility: Visibility,
pub tls: Option<TlsModel>,
pub constant: bool,
pub section: Option<Symbol>,
pub init: Option<DataList>,
}Expand description
A global variable.
A size and an alignment and an image, which is what the object writer needs. init is
None for a declaration of something defined in another object, which is the only thing
that distinguishes the two.
Fields§
§name: SymbolThe name it is reached by.
size: u64Its size in bytes, which the image must add up to.
align: u32Its required alignment in bytes, always a power of two.
linkage: LinkageHow the linker sees it.
visibility: VisibilityHow the dynamic linker sees it.
tls: Option<TlsModel>The model to reach it by if it is thread-local, and None if it is not.
constant: boolWhether writing through a pointer to it is undefined, which is what puts it in
.rodata rather than .data.
section: Option<Symbol>The section to put it in, from __attribute__((section(...))), or None to let the
object writer choose from the other fields.
init: Option<DataList>Its initial image, or None if it is only declared here.