pub struct LayoutHints {
pub pclntab_version: PclntabVersion,
pub go_minor: Option<u32>,
pub has_typelink_section: bool,
pub has_go_type_section: bool,
}Expand description
Out-of-band signals used to pick the moduledata layout.
Everything here is derived from the containing binary rather than from
the moduledata bytes themselves, so it has to be threaded in by the caller.
Grouping the signals keeps Moduledata::parse from growing a row of
positional booleans whose meaning is invisible at the call site.
Fields§
§pclntab_version: PclntabVersionpclntab magic of the binary, which fixes the Go-version floor: Go118
implies 1.18+ (rodata/gofunc), Go120 implies 1.20+ (covctrs).
go_minor: Option<u32>Go minor version, when a version string was recovered. None for
binaries whose version was stripped or obfuscated away.
has_typelink_section: boolWhether a .typelink / __typelink section was found. Its absence
is weak evidence of Go 1.27+ — PE, wasm, and RELRO ELF links spelled
.data.rel.ro.typelink have no such section at any version — so it is
never used alone. See Moduledata::parse.
has_go_type_section: boolWhether a .go.type / __go_type section was found. This one is a
positive Go 1.27+ signal: the section did not exist before.
Trait Implementations§
Source§impl Clone for LayoutHints
impl Clone for LayoutHints
Source§fn clone(&self) -> LayoutHints
fn clone(&self) -> LayoutHints
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more