Commit Graph
12288 Commits
Author SHA1 Message Date
Vincent Koc d2ab2d3de4 test(mcp): share summary Evidence envelope fixtures (#16982) 2026-12-05 15:54:18 +08:00
Vincent Koc 2b0f0fa154 refactor(rom): share Mega Drive external RAM descriptor fields (#16984) 2026-12-05 15:41:15 +08:00
Vincent Koc d1ff1a070a test(native): share unsigned wrapped 32-bit fixture writes (#16986) 2026-12-05 15:33:54 +08:00
Vincent Koc c809ee5405 refactor(ntfs): derive attribute coverage from the recorded issue (#16983) 2026-12-05 15:33:44 +08:00
Vincent Koc 27d1f06a8f refactor(dwarf): share section and image metadata types (#16985) 2026-12-05 15:32:54 +08:00
Vincent Koc d464573d4e refactor(javascript): share transfer read result typing (#16981) 2026-12-05 15:32:44 +08:00
Vincent Koc 52dbe3a63a refactor(unityfs): reuse strict header string decoding (#16973) 2026-12-05 15:17:24 +08:00
Vincent Koc 0662e39beb refactor(javascript): share pending call types (#16978) 2026-12-05 15:12:58 +08:00
Vincent Koc 003b9e29f2 refactor(uimage): construct format failures in one place (#16976) 2026-12-05 15:12:49 +08:00
Vincent Koc cf1d2c0f93 test(python): reuse the marshal small tuple fixture (#16975) 2026-12-05 15:11:56 +08:00
Vincent Koc bff6da7449 refactor(javascript): share graph comparison input fields (#16974) 2026-12-05 15:11:47 +08:00
Vincent Koc 0a6558d580 test(artifacts): share member comparison fixture logic (#16977) 2026-12-05 15:09:28 +08:00
Vincent Koc 89455aecbc refactor(ines): construct failures at their factory (#16970) 2026-12-05 14:56:48 +08:00
Vincent Koc 96d53b6ea0 refactor(swf): reuse body truncation extents (#16967) 2026-12-05 14:53:05 +08:00
Vincent Koc 56e38d0848 refactor(investigation): reuse Unknown registry read contracts (#16972) 2026-12-05 14:47:11 +08:00
Vincent Koc e14011421b test(setup): share stdio configuration fixtures (#16971) 2026-12-05 14:44:54 +08:00
Vincent Koc 6119c066b7 refactor(gpu): reuse codec completion result typing (#16968) 2026-12-05 14:44:45 +08:00
Vincent Koc b0bb67a93f test(artifacts): share asset entry region assertions (#16969) 2026-12-05 14:38:51 +08:00
Entrpiandmorluto 782b12a826 fix(ghidra)!: refuse Xtensa ELF unless .xtensa.info declares PC-relative literals (#16664)
* fix(ghidra)!: refuse Xtensa ELF unless .xtensa.info declares PC-relative literals

Ghidra's Xtensa language computes every L32R address from the instruction's
own address and never reads LITBASE, so a build with absolute (LITBASE)
literals decodes to wrong literal values and references without any sign of
error. Main admitted every Xtensa ELF without reading the build declaration.

Target resolution now reads the `.xtensa.info` note once, by section name,
and records its USE_ABSOLUTE_LITERALS and ABI declarations beside the header
facts. Ghidra admission refuses absolute literals and any declaration it
cannot establish, with architecture_unsupported and a reason that names the
declaration. Call0 builds stay admitted and carry a limitation naming the
calling-convention mismatch until a call0 lane assigns Ghidra's __call0
prototype. The header-selected language and profile from #11178 are kept.

The reader, note parser, fixture and real-Ghidra lane come from #7486; its
header gates, pinned language and separate guide page are not ported.

BREAKING CHANGE: Ghidra now refuses Xtensa ELF files whose .xtensa.info
section declares absolute literals (USE_ABSOLUTE_LITERALS=1), declares a
literal or ABI value other than 0 or 1, cannot be read, or is missing. Main
opened them and decoded every L32R as PC-relative. No setting restores the
old behavior.

* refactor(ghidra): move the processor dispatch out of the PSP profile

ghidraProcessorUnsupportedReason selects each architecture's profile for
every Ghidra target, so it now lives in GhidraProcessorAdmission.ts.
GhidraPspProfile.ts keeps only the Allegrex predicate and the PSPSDK
declaration checks, as ghidraPspUnsupportedReason. The callers' result
is renamed from mipsReason to processorReason.

* refactor(targets): read .xtensa.info through the shared ELF section walk

The .xtensa.info lookup had its own batched section-header loop and its
own cancellable file reader. It is now a declaration reader like the
RISC-V one: readXtensaElfDeclarations walks the headers with
visitElfSectionHeaders, and target resolution drives it with
readElfDeclarations, which owns the descriptor reads and cancellation.
The section-name table is copied in reads of at most 64 KiB, within the
driver's window.

The boundary tests drive the reader with a recording source for the
bounded-request check, and check cancellation through parseBinaryTarget
at the note payload read.

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-12-05 06:19:17 +00:00
Vincent Koc b23d294061 test(elf): share in-memory byte source fixtures (#16966) 2026-12-05 14:18:14 +08:00
Vincent Koc f0dba5006a refactor(javascript): share binding input fields (#16965) 2026-12-05 14:18:00 +08:00
Vincent Koc 6392a169d7 refactor(gba): remove the repeated header recognition check (#16960)
* refactor(gba): remove the repeated header recognition check

* refactor(gba): share recognition fields through the boolean helper
2026-12-05 14:17:50 +08:00
Vincent Koc 56d044e9a0 refactor(uf2): share block magic checks (#16964) 2026-12-05 14:15:32 +08:00
Vincent Koc e7237a1b2b refactor(call-path): reuse search input fields in enumeration (#16963) 2026-12-05 14:04:46 +08:00
Vincent Koc 954e0a0696 test(desktop): share exported file checks (#16962) 2026-12-05 14:03:54 +08:00
Vincent Koc 963d1c505d test(macho): share fixed-width UTF-8 name fixtures (#16961) 2026-12-05 14:03:46 +08:00
Vincent Koc 7e3b70e43a refactor(environment): share item read target typing (#16959) 2026-12-05 14:02:52 +08:00
Vincent Koc c3c6f4627a test(zip): share the stored text member fixture (#16958) 2026-12-05 13:47:00 +08:00
Vincent Koc d98d463ccf refactor(switch): share NSO and NRO header fields (#16954) 2026-12-05 13:44:42 +08:00
Vincent Koc 070362bf24 test(javascript): share semantic result value fixtures (#16956) 2026-12-05 13:44:34 +08:00
Vincent Koc fa814c3460 refactor(plist): share expansion budget diagnostics (#16955) 2026-12-05 13:44:25 +08:00
Vincent Koc aa70cd60c5 test(native): reuse the analysis view projection fixture (#16957) 2026-12-05 13:42:49 +08:00
Vincent Koc b0cccebf4d refactor(managed): reuse the checked metadata table cursor (#16950) 2026-12-05 13:25:57 +08:00
Vincent Koc 21a5e4185f refactor(mbn): reuse decoded legacy header facts (#16952) 2026-12-05 13:25:37 +08:00
Vincent Koc 27c2293f01 refactor(android): share sparse output-size arithmetic (#16949) 2026-12-05 13:25:29 +08:00
Vincent Koc 2ddfb362ff test(firmware): share the short positional read fixture (#16953) 2026-12-05 13:22:51 +08:00
Vincent Koc 47443f4c64 test(plist): share the signed Int64 fixture encoder (#16951) 2026-12-05 13:21:59 +08:00
Vincent Koc 1dae82a0bf refactor(elf): share executable target family typing (#16947) 2026-12-05 13:08:28 +08:00
Vincent Koc e929d712d5 refactor(nds): share the path allowance diagnostic (#16943) 2026-12-05 13:08:07 +08:00
Vincent Koc 313bb76bcd test(environment): reuse numbered UUID fixtures (#16948) 2026-12-05 13:02:21 +08:00
Vincent Koc 6038cea422 refactor(pyinstaller): simplify the bounded cookie sum (#16946) 2026-12-05 13:02:12 +08:00
Vincent Koc a0c836d619 test(python): share signed 64-bit marshal constants (#16945) 2026-12-05 12:58:47 +08:00
Vincent Koc 6815eb481f refactor(firmware): reuse vector table header context (#16944) 2026-12-05 12:58:38 +08:00
Vincent Koc 4daa06d30e refactor(utmp): reuse the parsed record layout (#16941) 2026-12-05 12:57:26 +08:00
Vincent Koc 2ce38c0cd0 test(mips): share endian writers for ELF fixtures (#16942) 2026-12-05 12:55:20 +08:00
Vincent Koc f97e823e7d test: share artifact entry and coverage collection (#16937) 2026-12-05 12:41:24 +08:00
Vincent Koc 119b8b129b test(hopper): share mocked reply validation (#16936) 2026-12-05 12:29:45 +08:00
Vincent Koc bbd3d61f35 refactor(beam): share streamed chunk digestion (#16935) 2026-12-05 12:29:30 +08:00
Vincent Koc e2ae4345b3 test(il2cpp): share metadata report parsing (#16938) 2026-12-05 12:25:38 +08:00
Vincent Koc 311b73f1ff test(zstd): share the single-byte frame fixture (#16934) 2026-12-05 12:24:50 +08:00