mirror of
https://github.com/morluto/rea.git
synced 2026-10-29 10:55:57 +00:00
feat(il2cpp): link native methods and export Ghidra seeds
Link IL2CPP metadata names to native addresses and types through shared CLI/MCP workflows, with bounded queries and atomic Ghidra seed export. Preserve the original implementation by 8rulerstar and follow-up correctness, resource, provenance, and CI dependency repairs. Verified against real Windows/Android artifacts, independent references, actual Ghidra, and focused CLI/MCP tests. Fixes #5112.
This commit is contained in:
1 parent
e50a271c72
commit
52d1a72af0
43 files changed
+5060
-368
No files matched your search
@@ -0,0 +1,49 @@
|
||||
export const IL2CPP_BINARY_FAILURE_REASONS = {
|
||||
unsupported: [
|
||||
"unsupported-container",
|
||||
"slice-selection-required",
|
||||
"slice-not-found",
|
||||
"ambiguous-slice-selection",
|
||||
"unsupported-pointer-encoding",
|
||||
"unsupported-type-kind",
|
||||
],
|
||||
capacity: [
|
||||
"native-index-capacity",
|
||||
"type-nesting-capacity",
|
||||
"native-type-text-capacity",
|
||||
],
|
||||
malformed: [
|
||||
"malformed-container",
|
||||
"code-gen-modules-not-found",
|
||||
"ambiguous-code-gen-module",
|
||||
"code-registration-not-found",
|
||||
"invalid-method-pointer",
|
||||
"invalid-method-token",
|
||||
"metadata-registration-not-found",
|
||||
"invalid-type",
|
||||
],
|
||||
} as const;
|
||||
|
||||
export type Il2cppBinaryFailureReason =
|
||||
(typeof IL2CPP_BINARY_FAILURE_REASONS)[keyof typeof IL2CPP_BINARY_FAILURE_REASONS][number];
|
||||
|
||||
/** A native image REA cannot link, either outside coverage or inconsistent with the metadata. */
|
||||
export class Il2cppBinaryFormatFailure extends Error {
|
||||
readonly kind: "unsupported" | "malformed" | "capacity";
|
||||
constructor(
|
||||
readonly reason: Il2cppBinaryFailureReason,
|
||||
message: string,
|
||||
) {
|
||||
super(`${reason}: ${message}`);
|
||||
this.name = "Il2cppBinaryFormatFailure";
|
||||
this.kind = (
|
||||
IL2CPP_BINARY_FAILURE_REASONS.unsupported as readonly string[]
|
||||
).includes(reason)
|
||||
? "unsupported"
|
||||
: (IL2CPP_BINARY_FAILURE_REASONS.capacity as readonly string[]).includes(
|
||||
reason,
|
||||
)
|
||||
? "capacity"
|
||||
: "malformed";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user