pe: cover delay-load and ordinal imports #1051

Merged
lambirou merged 1 commit from upstream-pr/1058 into main 2026-11-24 00:10:55 +00:00
lambirou commented 2026-11-23 23:51:18 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-23T23:51:18Z.


Change

Add one source-built PE control for the three import forms requested by XCL-03 and a named
missing-binding control.

  • The fixture has a normal named import, a normal ordinal import, a delay named import and a delay
    ordinal import. tools.pe_inventory.import_tables returns exactly the four expected
    (kind, module, symbol) rows, including #77 and #9.
  • intake_exe.import_routes preserves the candidate route fields for all four rows without
    claiming resolution. routing_failures is empty for the HLE and stub modules.
  • The negative control uses pe_package_preflight.summarize and pe_run_package.plan with a
    provider that exports named_value and ordinal #77. A missing name and a missing ordinal
    both produce bundled_export_not_found and the exact diagnostic
    app.exe: intake_provider.dll!<symbol>: bundled_export_not_found.

No resolver or route table is duplicated; the test exercises the merged XCL-01/XCL-02 paths.

Verification

  • out\pe-env\Scripts\python.exe -B tests\intake\import_forms_check.py
    • named, ordinal and delay-load import form checks passed.
  • out\pe-env\Scripts\python.exe -B tests\compat_report_check.py
    • compat report synthetic checks passed.
  • out\pe-env\Scripts\python.exe -B tests\intake\routing_check.py
    • intake routing synthetic checks passed.
  • docs_links_check.py: Self-test passed., Checked 15 Markdown files and 237 links..
  • git diff --check origin/main...HEAD: clean.
  • Not run: the Windows CTest mapping fixtures cpu_native_delay, cpu_aot_ordinal_import
    and pe_package_ordinal_plan; this worktree has no built CMake tree. Those tests already
    exercise the mapped/delay paths, so no mapping change was needed.

Evidence and follow-up

  • Branch pe/delay-load-ordinals, head 083c95c, based on b0fd051.
  • The fixture is built from bytes by tests/compat_report_check.build_image; it is not loaded or
    executed. The provider surface is checked against tests/intake/provider.def.
  • The test is registered in the Linux Python job and the AGENTS list; docs/experiments.md
    records the four-form fixture and the named refusal.
  • Provenance: this is Xbox2Windows tooling and its existing PE reader; no XCL code, table or
    output is used.
  • Follow-up: no new mapping behavior is claimed. A future PE mapping change can add the same
    forms to the C++ pe_map fixture if it needs independent coverage.
  • No game files, dumps, shader bytes, title paths or secrets are included.

Checklist

  • One reviewable behavior: named, ordinal and delay-load form coverage.
  • Positive four-form fixture and missing name/ordinal controls.
  • Documentation and Linux Python job updated.
  • No game files, dumps, logs or secrets.
  • Provenance checked; no XCL code used.
  • AI-assisted (Codex).
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6571306454 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1058). Originally posted by [lambirou](https://github.com/lambirou) on 2026-11-23T23:51:18Z. --- ## Change Add one source-built PE control for the three import forms requested by XCL-03 and a named missing-binding control. - The fixture has a normal named import, a normal ordinal import, a delay named import and a delay ordinal import. `tools.pe_inventory.import_tables` returns exactly the four expected `(kind, module, symbol)` rows, including `#77` and `#9`. - `intake_exe.import_routes` preserves the candidate route fields for all four rows without claiming resolution. `routing_failures` is empty for the HLE and stub modules. - The negative control uses `pe_package_preflight.summarize` and `pe_run_package.plan` with a provider that exports `named_value` and ordinal `#77`. A missing name and a missing ordinal both produce `bundled_export_not_found` and the exact diagnostic `app.exe: intake_provider.dll!<symbol>: bundled_export_not_found`. No resolver or route table is duplicated; the test exercises the merged XCL-01/XCL-02 paths. ## Verification - `out\pe-env\Scripts\python.exe -B tests\intake\import_forms_check.py` - `named, ordinal and delay-load import form checks passed`. - `out\pe-env\Scripts\python.exe -B tests\compat_report_check.py` - `compat report synthetic checks passed`. - `out\pe-env\Scripts\python.exe -B tests\intake\routing_check.py` - `intake routing synthetic checks passed`. - `docs_links_check.py`: `Self-test passed.`, `Checked 15 Markdown files and 237 links.`. - `git diff --check origin/main...HEAD`: clean. - Not run: the Windows CTest mapping fixtures `cpu_native_delay`, `cpu_aot_ordinal_import` and `pe_package_ordinal_plan`; this worktree has no built CMake tree. Those tests already exercise the mapped/delay paths, so no mapping change was needed. ## Evidence and follow-up - Branch `pe/delay-load-ordinals`, head `083c95c`, based on `b0fd051`. - The fixture is built from bytes by `tests/compat_report_check.build_image`; it is not loaded or executed. The provider surface is checked against `tests/intake/provider.def`. - The test is registered in the Linux Python job and the AGENTS list; `docs/experiments.md` records the four-form fixture and the named refusal. - Provenance: this is Xbox2Windows tooling and its existing PE reader; no XCL code, table or output is used. - Follow-up: no new mapping behavior is claimed. A future PE mapping change can add the same forms to the C++ `pe_map` fixture if it needs independent coverage. - No game files, dumps, shader bytes, title paths or secrets are included. ## Checklist - [x] One reviewable behavior: named, ordinal and delay-load form coverage. - [x] Positive four-form fixture and missing name/ordinal controls. - [x] Documentation and Linux Python job updated. - [x] No game files, dumps, logs or secrets. - [x] Provenance checked; no XCL code used. - [x] AI-assisted (Codex).
upstream-sync closed this pull request 2026-11-24 06:46:03 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!1051
No description provided.