Files
reverse-engineering-anything/tests/conformance/ghidra/mips-checks.d.mts
T
Abdul Samad SiddiquiandKaoru0822 a40ee741c2 test(ghidra): align MIPS verifier ABI and snapshot expectations
Fixes #3415. Retain independently inspected GNU attribute facts and compare exact snapshot wire fields. Preserve strict metadata comparisons, specific incomplete-ABI refusals and source immutability checks.

Original implementation by @AbdulSamad94.

Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
2026-10-15 22:00:16 +08:00

52 lines
1.4 KiB
TypeScript

import type {
MipsAbiFlags,
MipsElfMetadata,
MipsGnuAttributes,
} from "../../../src/domain/binaryTargetTypes.js";
import type { JsonValue } from "../../../src/domain/jsonValue.js";
export type MipsReadelfMetadata = MipsElfMetadata & {
readonly abiFlags: MipsAbiFlags;
readonly gnuAttributes: MipsGnuAttributes | null;
};
export function expectedMipsElfProfile(
mips: MipsReadelfMetadata,
): Readonly<Record<string, JsonValue>>;
export type MipsFloatAbi = "hard" | "soft";
export interface MipsReadelfFacts {
mips: MipsReadelfMetadata & { readonly gnuAttributes: null };
symbols: Record<string, string>;
}
export function parseMipsReadelfSectionTypes(text: string): readonly string[];
export function parseMipsReadelf(
text: string,
byteOrder: string,
floatAbi?: MipsFloatAbi,
objectType?: "exec" | "rel",
): MipsReadelfFacts;
export function inspectMipsReadelf(
path: string,
byteOrder: string,
floatAbi?: MipsFloatAbi,
): Promise<
MipsReadelfFacts & { command: string; version: string; raw: string }
>;
export function assertMipsLoadedImage(
observations: unknown,
byteOrder: string,
sha256: string,
): void;
export function assertMipsProbe(
move: unknown,
branch: unknown,
byteOrder: string,
address: string,
): void;
export function assertMipsGlobal(bytes: string, byteOrder: string): void;
export function assertMipsSoftFloatStorage(
boundaries: Record<string, unknown>,
byteOrder: string,
): void;