fix(flutter): reject ambiguous ELF mappings and bound note reads (#2334)
* fix(flutter): reject ambiguous mappings and bound ELF notes Resolve PT_LOAD interpretations once for symbols and dynamic tables, including partial overlaps. Preserve equivalent mappings and leave conflicting or invalid alternate definitions unresolved. Bound distinct nonempty ELF note ranges before retention and reads, deduplicate shared ranges, preserve observed build-ID candidates and report partial coverage on exhaustion. Correct shared verifier workspace ownership and structured Windows path assertions. Addresses the two post-merge review findings on PR #1582. Validation: 147 focused cases across Linux, macOS Sonoma 14.8.9 and non-administrator Windows 11 build 26300.9457; real Gallery CLI/MCP checks on all three hosts; six compiler-produced ELF32/ELF64 hash-layout cases; static, docs, discovery and duplication checks. Full string-pool projections remain explicitly bounded. * test(flutter): parse complete facts through named result schemas --------- Co-authored-by: me <me@medz.org> Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
This commit is contained in:
co-authored by
me
morluto
parent
fd65e278be
commit
e3a012d6c9
@@ -6,6 +6,7 @@ import {
|
||||
buildElf64Image,
|
||||
buildStrippedElf64Image,
|
||||
snapshotSection,
|
||||
appendElfRanges,
|
||||
} from "./FlutterBuild.fixture.js";
|
||||
|
||||
const readElfSymbol = async (bytes: Buffer, name: string) => {
|
||||
@@ -143,6 +144,96 @@ describe("readElfSymbol", () => {
|
||||
});
|
||||
|
||||
describe("ELF symbol-table ownership", () => {
|
||||
it.each([
|
||||
{ address: 0x400, offset: 0x700, size: 52 },
|
||||
{ address: 0x410, offset: 0x710, size: 4 },
|
||||
{ address: 0x3f0, offset: 0x6f0, size: 20 },
|
||||
])(
|
||||
"rejects conflicting interpretations of any symbol byte: %j",
|
||||
async (range) => {
|
||||
const image = appendElfRanges(imageWithSections(), "program", [
|
||||
{ type: 1, ...range },
|
||||
]);
|
||||
const names = ["_kDartVmSnapshotData", "_kDartIsolateSnapshotData"];
|
||||
const result = await readElfSymbols(image, names);
|
||||
expect(result.symbols).toEqual([
|
||||
{ name: names[1], offset: 0x800, size: 52 },
|
||||
]);
|
||||
expect(result.failures).toContainEqual({
|
||||
reason: expect.stringContaining("conflicting PT_LOAD"),
|
||||
});
|
||||
const phoff = Number(image.readBigUInt64LE(0x20));
|
||||
const first = Buffer.from(image.subarray(phoff, phoff + 56));
|
||||
image.copy(image, phoff, phoff + 56, phoff + 112);
|
||||
first.copy(image, phoff + 56);
|
||||
expect(await readElfSymbols(image, names)).toEqual(result);
|
||||
},
|
||||
);
|
||||
|
||||
it("accepts equivalent overlaps and excludes adjacent unrelated mappings", async () => {
|
||||
const image = appendElfRanges(imageWithSections(), "program", [
|
||||
{ type: 1, address: 0x410, offset: 0x410, size: 4 },
|
||||
{ type: 1, address: 0x400 + 52, offset: 0x700, size: 4 },
|
||||
]);
|
||||
expect(await readElfSymbols(image, ["_kDartVmSnapshotData"])).toEqual({
|
||||
symbols: [{ name: "_kDartVmSnapshotData", offset: 0x400, size: 52 }],
|
||||
failures: [],
|
||||
});
|
||||
});
|
||||
|
||||
it("does not publish an earlier definition when another definition has unresolved mapping", async () => {
|
||||
const image = imageWithSections();
|
||||
const shoff = Number(image.readBigUInt64LE(0x28));
|
||||
const symbols = Number(image.readBigUInt64LE(shoff + 64 + 0x18));
|
||||
image.writeUInt32LE(image.readUInt32LE(symbols), symbols + 24);
|
||||
const conflict = appendElfRanges(image, "program", [
|
||||
{ type: 1, address: 0x810, offset: 0x710, size: 4 },
|
||||
]);
|
||||
const result = await readElfSymbols(conflict, ["_kDartVmSnapshotData"]);
|
||||
expect(result.symbols).toEqual([]);
|
||||
expect(result.failures).toEqual([
|
||||
{
|
||||
reason: "Symbol _kDartVmSnapshotData has conflicting PT_LOAD mappings",
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("handles zero-width symbols at a unique segment end without choosing a conflicting shared endpoint", async () => {
|
||||
const image = imageWithSections();
|
||||
const shoff = Number(image.readBigUInt64LE(0x28));
|
||||
const symbols = Number(image.readBigUInt64LE(shoff + 64 + 0x18));
|
||||
const at = Number(image.readBigUInt64LE(64 + 0x20));
|
||||
image.writeBigUInt64LE(BigInt(at), symbols + 8);
|
||||
image.writeBigUInt64LE(0n, symbols + 16);
|
||||
expect(
|
||||
(await readElfSymbols(image, ["_kDartVmSnapshotData"])).symbols,
|
||||
).toEqual([{ name: "_kDartVmSnapshotData", offset: at, size: 0 }]);
|
||||
const ambiguous = appendElfRanges(image, "program", [
|
||||
{ type: 1, address: at, offset: 0x700, size: 4 },
|
||||
]);
|
||||
expect(
|
||||
(await readElfSymbols(ambiguous, ["_kDartVmSnapshotData"])).symbols,
|
||||
).toEqual([]);
|
||||
});
|
||||
|
||||
it.each(["hash", "symbols", "strings"] as const)(
|
||||
"rejects partially conflicting dynamic %s mappings",
|
||||
async (table) => {
|
||||
const image = strippedImageWithSections();
|
||||
const dynamic = Number(image.readBigUInt64LE(64 + 56 + 8));
|
||||
const tagIndex = table === "hash" ? 4 : table === "symbols" ? 0 : 1;
|
||||
const at = Number(image.readBigUInt64LE(dynamic + tagIndex * 16 + 8));
|
||||
const conflict = appendElfRanges(image, "program", [
|
||||
{ type: 1, address: at + 1, offset: 0x700, size: 1 },
|
||||
]);
|
||||
const result = await readElfSymbols(conflict, ["_kDartVmSnapshotData"]);
|
||||
expect(result.symbols).toEqual([]);
|
||||
expect(result.failures).toContainEqual({
|
||||
reason: expect.stringContaining("conflicting PT_LOAD"),
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
it.each([false, true])(
|
||||
"keeps a symbol terminator inside dynstr (stripped: %s)",
|
||||
async (stripped) => {
|
||||
|
||||
+48
-44
@@ -1,5 +1,6 @@
|
||||
import { Buffer } from "node:buffer";
|
||||
import { setImmediate as yieldToEventLoop } from "node:timers/promises";
|
||||
import { createElfLoadMap } from "./ElfLoadMap.js";
|
||||
import {
|
||||
SNAPSHOT_HASH_LENGTH,
|
||||
SNAPSHOT_HASH_OFFSET,
|
||||
@@ -205,6 +206,7 @@ export const readElfSymbols = async (
|
||||
vaddr === null ||
|
||||
offset === null ||
|
||||
filesz === null ||
|
||||
!Number.isSafeInteger(vaddr + filesz) ||
|
||||
offset > bytes.length ||
|
||||
filesz > bytes.length - offset
|
||||
)
|
||||
@@ -214,17 +216,7 @@ export const readElfSymbols = async (
|
||||
return failure("Multiple PT_DYNAMIC segments are ambiguous");
|
||||
else dynamicSegment = { offset, filesz };
|
||||
}
|
||||
const toOffset = (vaddr: number, size: number): number | null => {
|
||||
const segment = segments.find(
|
||||
(candidate) =>
|
||||
vaddr >= candidate.vaddr &&
|
||||
vaddr - candidate.vaddr <= candidate.filesz &&
|
||||
size <= candidate.filesz - (vaddr - candidate.vaddr),
|
||||
);
|
||||
return segment === undefined
|
||||
? null
|
||||
: segment.offset + vaddr - segment.vaddr;
|
||||
};
|
||||
const toOffset = await createElfLoadMap(segments, signal);
|
||||
if (segments.length === 0)
|
||||
return failure("ELF image has no PT_LOAD segments");
|
||||
const tables: {
|
||||
@@ -335,26 +327,25 @@ export const readElfSymbols = async (
|
||||
const gnu = tags.get(0x6ffffef5);
|
||||
if (sysv !== undefined) {
|
||||
const at = toOffset(sysv, 8);
|
||||
if (at === null) return failure("DT_HASH header is not file-backed");
|
||||
const buckets = reader.u32(at)!;
|
||||
count = reader.u32(at + 4)!;
|
||||
if (toOffset(sysv, 8 + 4 * (buckets + count)) === null)
|
||||
return failure("DT_HASH table is truncated");
|
||||
if (!at.ok) return failure(`DT_HASH header ${at.error.reason}`);
|
||||
const buckets = reader.u32(at.value)!;
|
||||
count = reader.u32(at.value + 4)!;
|
||||
const table = toOffset(sysv, 8 + 4 * (buckets + count));
|
||||
if (!table.ok) return failure(`DT_HASH table ${table.error.reason}`);
|
||||
} else if (gnu !== undefined) {
|
||||
const at = toOffset(gnu, 16);
|
||||
if (at === null) return failure("DT_GNU_HASH header is not file-backed");
|
||||
const buckets = reader.u32(at)!;
|
||||
const firstSymbol = reader.u32(at + 4)!;
|
||||
const bloomWords = reader.u32(at + 8)!;
|
||||
if (!at.ok) return failure(`DT_GNU_HASH header ${at.error.reason}`);
|
||||
const buckets = reader.u32(at.value)!;
|
||||
const firstSymbol = reader.u32(at.value + 4)!;
|
||||
const bloomWords = reader.u32(at.value + 8)!;
|
||||
const prefixBytes = 16 + bloomWords * (is64 ? 8 : 4) + buckets * 4;
|
||||
if (
|
||||
buckets === 0 ||
|
||||
bloomWords === 0 ||
|
||||
toOffset(gnu, prefixBytes) === null
|
||||
)
|
||||
if (buckets === 0 || bloomWords === 0)
|
||||
return failure("DT_GNU_HASH buckets are malformed");
|
||||
const prefix = toOffset(gnu, prefixBytes);
|
||||
if (!prefix.ok)
|
||||
return failure(`DT_GNU_HASH buckets ${prefix.error.reason}`);
|
||||
let last = 0;
|
||||
const bucketsAt = at + 16 + bloomWords * (is64 ? 8 : 4);
|
||||
const bucketsAt = at.value + 16 + bloomWords * (is64 ? 8 : 4);
|
||||
for (let index = 0; index < buckets; index += 1) {
|
||||
if (index % 4096 === 0) {
|
||||
await yieldToEventLoop();
|
||||
@@ -374,9 +365,10 @@ export const readElfSymbols = async (
|
||||
signal?.throwIfAborted();
|
||||
}
|
||||
const span = prefixBytes + (index - firstSymbol + 1) * 4;
|
||||
if (toOffset(gnu, span) === null)
|
||||
return failure("DT_GNU_HASH chain is unterminated");
|
||||
const chain = reader.u32(at + span - 4)!;
|
||||
const range = toOffset(gnu, span);
|
||||
if (!range.ok)
|
||||
return failure(`DT_GNU_HASH chain ${range.error.reason}`);
|
||||
const chain = reader.u32(at.value + span - 4)!;
|
||||
index += 1;
|
||||
if ((chain & 1) !== 0) {
|
||||
count = index;
|
||||
@@ -388,14 +380,22 @@ export const readElfSymbols = async (
|
||||
return failure("Stripped ELF has no DT_HASH or DT_GNU_HASH symbol count");
|
||||
const offset = toOffset(sym, count * entrySize);
|
||||
const stringOffset = toOffset(str, stringSize);
|
||||
if (offset === null || stringOffset === null)
|
||||
return failure("Dynamic symbol or string table is not file-backed");
|
||||
tables.push({ offset, count, stringOffset, stringSize });
|
||||
if (!offset.ok)
|
||||
return failure(`Dynamic symbol table ${offset.error.reason}`);
|
||||
if (!stringOffset.ok)
|
||||
return failure(`Dynamic string table ${stringOffset.error.reason}`);
|
||||
tables.push({
|
||||
offset: offset.value,
|
||||
count,
|
||||
stringOffset: stringOffset.value,
|
||||
stringSize,
|
||||
});
|
||||
}
|
||||
const wanted = new Set(symbolNames);
|
||||
const symbols = new Map<string, ElfSymbol>();
|
||||
const ambiguous = new Set<string>();
|
||||
const failures: ElfParseFailure[] = [];
|
||||
const unresolved = new Set<string>();
|
||||
const failures = new Set<string>();
|
||||
for (const table of tables) {
|
||||
for (let index = 0; index < table.count; index += 1) {
|
||||
if (index % 4096 === 0) {
|
||||
@@ -419,33 +419,37 @@ export const readElfSymbols = async (
|
||||
const value = is64 ? reader.u64(base + 8) : reader.u32(base + 4);
|
||||
const size = is64 ? reader.u64(base + 16) : reader.u32(base + 8);
|
||||
if (value === null || size === null) {
|
||||
failures.push({ reason: `Symbol ${name} has unrepresentable bounds` });
|
||||
failures.add(`Symbol ${name} has unrepresentable bounds`);
|
||||
unresolved.add(name);
|
||||
continue;
|
||||
}
|
||||
const offset = toOffset(value, size);
|
||||
if (offset === null) {
|
||||
failures.push({ reason: `Symbol ${name} has no file-backed range` });
|
||||
if (!offset.ok) {
|
||||
failures.add(`Symbol ${name} ${offset.error.reason}`);
|
||||
unresolved.add(name);
|
||||
continue;
|
||||
}
|
||||
const previous = symbols.get(name);
|
||||
if (
|
||||
previous !== undefined &&
|
||||
(previous.offset !== offset || previous.size !== size)
|
||||
(previous.offset !== offset.value || previous.size !== size)
|
||||
)
|
||||
ambiguous.add(name);
|
||||
else symbols.set(name, { name, offset, size });
|
||||
else symbols.set(name, { name, offset: offset.value, size });
|
||||
}
|
||||
}
|
||||
for (const name of ambiguous) {
|
||||
symbols.delete(name);
|
||||
failures.push({ reason: `Symbol ${name} has conflicting definitions` });
|
||||
failures.add(`Symbol ${name} has conflicting definitions`);
|
||||
}
|
||||
for (const name of unresolved) symbols.delete(name);
|
||||
for (const name of wanted)
|
||||
if (!symbols.has(name))
|
||||
failures.push({
|
||||
reason: `symbol ${name} is not in the dynamic symbol table`,
|
||||
});
|
||||
return { symbols: [...symbols.values()], failures };
|
||||
if (!symbols.has(name) && !ambiguous.has(name) && !unresolved.has(name))
|
||||
failures.add(`symbol ${name} is not in the dynamic symbol table`);
|
||||
return {
|
||||
symbols: [...symbols.values()],
|
||||
failures: [...failures].map((reason) => ({ reason })),
|
||||
};
|
||||
};
|
||||
|
||||
/** Read one Dart snapshot section header from its file offset. */
|
||||
|
||||
@@ -8,6 +8,9 @@ import {
|
||||
|
||||
const MAX_METADATA_BYTES = 8 * 1024 * 1024;
|
||||
const MAX_BUILD_IDS = 64;
|
||||
// Range bookkeeping and separate positional reads need a budget independent
|
||||
// of payload bytes: tiny/overlapping declarations can otherwise fan out I/O.
|
||||
const MAX_NOTE_RANGES = 1024;
|
||||
|
||||
export interface ElfBuildIds {
|
||||
readonly candidates: readonly string[];
|
||||
@@ -21,9 +24,10 @@ export const readElfBuildIds = async (
|
||||
signal: AbortSignal | undefined,
|
||||
): Promise<ElfBuildIds> => {
|
||||
const candidates = new Set<string>();
|
||||
const failures: ElfParseFailure[] = [];
|
||||
const failure = (reason: string): ElfBuildIds => ({
|
||||
candidates: [...candidates],
|
||||
failures: [{ reason }],
|
||||
failures: [...failures, { reason }],
|
||||
});
|
||||
let examined = 0;
|
||||
const read = async (offset: number, size: number): Promise<Buffer | null> => {
|
||||
@@ -59,7 +63,7 @@ export const readElfBuildIds = async (
|
||||
if (parsed.failure !== undefined) return failure(parsed.failure.reason);
|
||||
const h = parsed.header;
|
||||
const ranges = new Map<string, { offset: number; size: number }>();
|
||||
for (const table of [
|
||||
tables: for (const table of [
|
||||
{
|
||||
offset: h.e_phoff,
|
||||
width: h.e_phentsize,
|
||||
@@ -105,7 +109,17 @@ export const readElfBuildIds = async (
|
||||
size > totalBytes - offset
|
||||
)
|
||||
return failure("ELF note range is not file-backed");
|
||||
ranges.set(`${offset}:${size}`, { offset, size });
|
||||
if (size === 0) continue;
|
||||
const key = `${offset}:${size}`;
|
||||
if (ranges.has(key)) continue;
|
||||
if (ranges.size === MAX_NOTE_RANGES) {
|
||||
failures.push({
|
||||
reason:
|
||||
"ELF notes exceed the 1024-range note-range inventory/read budget",
|
||||
});
|
||||
break tables;
|
||||
}
|
||||
ranges.set(key, { offset, size });
|
||||
}
|
||||
}
|
||||
const align4 = (value: number): number => Math.ceil(value / 4) * 4;
|
||||
@@ -154,5 +168,5 @@ export const readElfBuildIds = async (
|
||||
}
|
||||
}
|
||||
signal?.throwIfAborted();
|
||||
return { candidates: [...candidates], failures: [] };
|
||||
return { candidates: [...candidates], failures };
|
||||
};
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
import { setImmediate as yieldToEventLoop } from "node:timers/promises";
|
||||
import { err, ok, type Result } from "../domain/result.js";
|
||||
|
||||
interface LoadSegment {
|
||||
readonly vaddr: number;
|
||||
readonly offset: number;
|
||||
readonly filesz: number;
|
||||
}
|
||||
|
||||
/** Normalize overlapping file-backed interpretations once, before any lookups. */
|
||||
export const createElfLoadMap = async (
|
||||
segments: readonly LoadSegment[],
|
||||
signal?: AbortSignal,
|
||||
): Promise<
|
||||
(address: number, size: number) => Result<number, { reason: string }>
|
||||
> => {
|
||||
const events = segments
|
||||
.filter((segment) => segment.filesz > 0)
|
||||
.flatMap((segment) => [
|
||||
{ at: segment.vaddr, delta: segment.offset - segment.vaddr, change: 1 },
|
||||
{
|
||||
at: segment.vaddr + segment.filesz,
|
||||
delta: segment.offset - segment.vaddr,
|
||||
change: -1,
|
||||
},
|
||||
])
|
||||
.sort((left, right) => left.at - right.at);
|
||||
const active = new Map<number, number>();
|
||||
const spans: { start: number; end: number; delta: number | null }[] = [];
|
||||
let previous = 0;
|
||||
for (let index = 0; index < events.length; index += 1) {
|
||||
if (index % 4096 === 0) {
|
||||
await yieldToEventLoop();
|
||||
signal?.throwIfAborted();
|
||||
}
|
||||
const event = events[index]!;
|
||||
if (event.at > previous && active.size > 0) {
|
||||
const delta = active.size === 1 ? active.keys().next().value! : null;
|
||||
const last = spans.at(-1);
|
||||
if (last?.end === previous && last.delta === delta) last.end = event.at;
|
||||
else spans.push({ start: previous, end: event.at, delta });
|
||||
}
|
||||
const count = (active.get(event.delta) ?? 0) + event.change;
|
||||
if (count === 0) active.delete(event.delta);
|
||||
else active.set(event.delta, count);
|
||||
previous = event.at;
|
||||
}
|
||||
// Prefix counts keep growing GNU-hash range checks logarithmic even with
|
||||
// many load segments. Null denotes conflicting interpretations, not a hole.
|
||||
const conflicts = [0];
|
||||
for (const span of spans)
|
||||
conflicts.push(conflicts.at(-1)! + Number(span.delta === null));
|
||||
const locate = (address: number): number => {
|
||||
let low = 0,
|
||||
high = spans.length;
|
||||
while (low < high) {
|
||||
const middle = Math.floor((low + high) / 2);
|
||||
if (spans[middle]!.start <= address) low = middle + 1;
|
||||
else high = middle;
|
||||
}
|
||||
return low - 1;
|
||||
};
|
||||
signal?.throwIfAborted();
|
||||
return (address, size) => {
|
||||
const missing = () =>
|
||||
err({ reason: "has no contiguous file-backed PT_LOAD range" });
|
||||
const ambiguous = () => err({ reason: "has conflicting PT_LOAD mappings" });
|
||||
if (
|
||||
!Number.isSafeInteger(address) ||
|
||||
!Number.isSafeInteger(size) ||
|
||||
address < 0 ||
|
||||
size < 0 ||
|
||||
!Number.isSafeInteger(address + size)
|
||||
)
|
||||
return missing();
|
||||
const first = locate(address);
|
||||
const span = spans[first];
|
||||
if (span === undefined || (size > 0 && address >= span.end))
|
||||
return missing();
|
||||
if (size === 0) {
|
||||
// A zero-width symbol at a shared endpoint still needs one file offset.
|
||||
if (address > span.end) return missing();
|
||||
const left = spans[first - 1];
|
||||
if (
|
||||
span.delta === null ||
|
||||
(span.start === address &&
|
||||
left?.end === address &&
|
||||
left.delta !== span.delta)
|
||||
)
|
||||
return ambiguous();
|
||||
return ok(address + span.delta);
|
||||
}
|
||||
const last = locate(address + size - 1);
|
||||
if (conflicts[last + 1]! !== conflicts[first]!) return ambiguous();
|
||||
return span.delta !== null &&
|
||||
address < span.end &&
|
||||
size <= span.end - address
|
||||
? ok(address + span.delta)
|
||||
: missing();
|
||||
};
|
||||
};
|
||||
@@ -265,3 +265,50 @@ export const engineFixtureImage = (options: {
|
||||
labels.copy(image, noteAt + options.notes.length);
|
||||
return image;
|
||||
};
|
||||
|
||||
/** Relocate one table and append declarations without disturbing payload bytes. */
|
||||
export const appendElfRanges = (
|
||||
image: Buffer,
|
||||
table: "program" | "section",
|
||||
ranges: readonly {
|
||||
type: number;
|
||||
offset: number;
|
||||
size: number;
|
||||
address?: number;
|
||||
}[],
|
||||
): Buffer => {
|
||||
const is64 = image[4] === 2;
|
||||
const program = table === "program";
|
||||
const offsetAt = program ? (is64 ? 0x20 : 0x1c) : is64 ? 0x28 : 0x20;
|
||||
const widthAt = program ? (is64 ? 0x36 : 0x2a) : is64 ? 0x3a : 0x2e;
|
||||
const countAt = widthAt + 2;
|
||||
const oldOffset = is64
|
||||
? Number(image.readBigUInt64LE(offsetAt))
|
||||
: image.readUInt32LE(offsetAt);
|
||||
const oldWidth = image.readUInt16LE(widthAt);
|
||||
const oldCount = image.readUInt16LE(countAt);
|
||||
const width = oldWidth || (is64 ? 64 : 40);
|
||||
const count = oldCount || 1; // A section table starts with its null entry.
|
||||
const offset = Math.ceil(image.length / 8) * 8;
|
||||
const result = Buffer.alloc(offset + (count + ranges.length) * width);
|
||||
image.copy(result);
|
||||
image.copy(result, offset, oldOffset, oldOffset + oldCount * oldWidth);
|
||||
const word = (value: number, at: number): void => {
|
||||
if (is64) result.writeBigUInt64LE(BigInt(value), at);
|
||||
else result.writeUInt32LE(value, at);
|
||||
};
|
||||
word(offset, offsetAt);
|
||||
result.writeUInt16LE(width, widthAt);
|
||||
result.writeUInt16LE(count + ranges.length, countAt);
|
||||
ranges.forEach((range, index) => {
|
||||
const at = offset + (count + index) * width;
|
||||
result.writeUInt32LE(range.type, at + (program ? 0 : 4));
|
||||
word(range.offset, at + (program ? (is64 ? 8 : 4) : is64 ? 0x18 : 0x10));
|
||||
word(
|
||||
range.size,
|
||||
at + (program ? (is64 ? 0x20 : 0x10) : is64 ? 0x20 : 0x14),
|
||||
);
|
||||
if (program) word(range.address ?? 0, at + (is64 ? 0x10 : 8));
|
||||
});
|
||||
return result;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user