mirror of
https://github.com/morluto/rea
synced 2026-10-26 22:28:27 -04:00
fix(native): preserve parsed section and architecture facts
Classify lipo parse failures once for native and artifact consumers, retain valid read-only ELF ranges independently of optional section names, and map IL2CPP reader architecture through the existing CPU identity owner before Mach-O parsing. Regression-first checks reproduced malformed lipo output, lost unnamed-section compiler paths, and the amd64/x86_64 adapter mismatch. Focused parser, artifact, Rust CLI/MCP, Go, and IL2CPP controls passed; authored fixtures do not establish real-provider behavior. Fixes #5982 Fixes #3397
This commit is contained in:
@@ -2,6 +2,7 @@ import {
|
||||
readFatContainerHeader,
|
||||
validateFatSlice,
|
||||
} from "../domain/apple/machoContainer.js";
|
||||
import { binaryMetadataArchitecture } from "../domain/binaryMetadataArchitecture.js";
|
||||
import {
|
||||
BinaryFormatFailure,
|
||||
BinaryResourceFailure,
|
||||
@@ -144,7 +145,11 @@ export function* openImageSteps(
|
||||
let machoPointerFixups: PointerFixups | undefined;
|
||||
if (container.format === "macho") {
|
||||
try {
|
||||
const layout = parseMachoLayout(image, container.architecture);
|
||||
const layout = parseMachoLayout(
|
||||
image,
|
||||
binaryMetadataArchitecture(container.architecture) ??
|
||||
container.architecture,
|
||||
);
|
||||
machoPointerFixups = parsePointerFixups(
|
||||
image,
|
||||
layout.fixups,
|
||||
|
||||
Reference in New Issue
Block a user