minor tweaks
This commit is contained in:
parent
fb652c39ae
commit
22ab973f0c
13 changed files with 223 additions and 144 deletions
|
|
@ -23,15 +23,18 @@ pub struct Entry {
|
|||
/// For a vtable-OFFSET locator: the class whose vtable the slot was measured on.
|
||||
///
|
||||
/// Part of the locator, not decoration — a slot index alone locates nothing, since it is only meaningful
|
||||
/// relative to a particular class's vtable. Taken from the class whose vtable the derivation actually
|
||||
/// chained the offset through, never parsed out of the entry name: a method declared on a base class
|
||||
/// routinely sits in a derived class's vtable, so the name's class and the measured class are different
|
||||
/// facts and only the second one locates anything.
|
||||
/// relative to a particular class's vtable.
|
||||
///
|
||||
/// It is the entry name's own class, stated explicitly: the deriver keys its slot timelines and
|
||||
/// alignment hops by the name's class and chains through that one, so "the class the offset was
|
||||
/// chained through" and "the class in the name" are one fact rather than two. Directly folded offsets
|
||||
/// (the multilib ground-truth path) carry no class at all and leave the consumer to split the name.
|
||||
/// So a reader may treat this as a convenience copy — never as a second, independent attribution.
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub class: Option<String>,
|
||||
/// Distinctive string literals this function references, each unique to it within its library.
|
||||
///
|
||||
/// NOT a third locator competing with the sig-XOR-offset pair — a supplement with a DIFFERENT failure
|
||||
/// NOT a locator competing with the signature and the offset — a supplement with a DIFFERENT failure
|
||||
/// mode. A byte signature is a snapshot of one build's codegen; a string survives a recompile that
|
||||
/// moves instructions. So a consumer that can resolve anchors (ModSharp's `refs.strings`) has a
|
||||
/// locator that keeps working across the window between Valve shipping a build and us republishing,
|
||||
|
|
@ -44,7 +47,9 @@ pub struct Entry {
|
|||
}
|
||||
|
||||
impl Entry {
|
||||
/// A signature-only locator (the deriver's sig-XOR-offset invariant as a constructor).
|
||||
/// A signature-only locator. A convenience for the common shape, NOT an invariant — an entry may carry
|
||||
/// a signature and an offset at once (the struct doc says so, and real `core` entries do), so anything
|
||||
/// judging an entry must check every locator it holds rather than the first one it finds.
|
||||
pub fn signature(library: impl Into<String>, linux: impl Into<String>) -> Entry {
|
||||
Entry {
|
||||
signature: Some(Sig {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue