fix(il2cpp): resolve ELF ABS64 and GLOB_DAT image definitions (#11075)

Derive bounded ELF ABS64 and GLOB_DAT link-image values for IL2CPP module
scanning while preserving the default conservative relocation policy.
Retain ambiguous hash declarations, validate complete hash-table mappings,
and disclose runtime-binding limitations in CLI and MCP evidence.

Validation: 408 focused tests, check:fast and docs:check passed. Public
CLI/MCP and independently linked ARM64/x86-64 ELF arithmetic were checked;
the original Unity binaries remain unavailable.

Refs #10478
Related: #10495

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
This commit is contained in:
Ysopwnableandgensokyo-dev authored and GitHub committed 2026-11-15 19:55:43 +08:00
1 parent cabd56ea71
commit 29dd58c96d
8 files changed
+569 -34

No files matched your search

+1
View File
@@ -122,6 +122,7 @@ export function* openImageSteps(image: Buffer): Generator<void, NativeImage> {
zeroFills: container.zero_fills,
},
IL2CPP_BINARY_BYTES,
{ symbolResolution: "image-definitions" },
);
} catch (cause) {
if (cause instanceof ElfPointerRelocationFailure) {
+5
View File
@@ -606,6 +606,11 @@ export class Il2cppMetadataProvider implements Il2cppMetadataPort {
binaryPath === undefined
? "Native code addresses and IL2CPP binary registration are not recovered without binary_path."
: `Method addresses come from the binary's code-generation module methodPointers, matched by module name, method count and metadata token; ${input.generic_instances === true ? "" : "generic method instances (see generic_instances), "}adjustor thunks and invokers are not linked, no-body means an observed zero slot, and unknown means no module claimed the method or its slot has an unresolved relocation.`,
...(linked.binary?.format === "elf"
? [
"ELF symbolic pointers use the selected file's defined symbols to derive link-image addresses; runtime symbol interposition, external definitions, TLS addresses and IFUNC results are not established.",
]
: []),
...(binaryPath !== undefined && input.generic_instances === true
? [
"Generic method instances come from genericMethodTable, methodSpecs, genericInsts and genericMethodPointers, with names following Il2CppDumper's GetMethodSpecName (namespace on the declaring type, nested types joined with '.', arity cut, IntPtr/UIntPtr, no byref mark). The CodeRegistration layout is the only one of the known 27.0 to 31 layouts whose counts bound every genericMethodTable row; metadata versions 24 and 39 and builds without a static CodeRegistration are refused. A generic row is no-body for an observed zero pointer slot and unknown, with no address, exactly when an issue names its row: a contradicting method spec (its name is then null), a shared method spec, an unmapped or non-executable pointer, or an unresolved relocation.",