PE: read long-format import descriptors #963
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!963
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/963/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@enzoduarte1 on GitHub · 2026-11-24 14:33 UTC · original
enzoduarte1:pe/import-lib-long-format→main· +311 −21 · 1 files · 1 commits · closed without mergingWhat
ImportLibrary::parseonly understood short-format import objects. Long-format import libraries (the ones whose archive members start with a 20-byte descriptor and no inline strings) were counted inother_membersbut yielded no imports at all.This patch recognizes that descriptor form, walks the following COFF members, and recovers the DLL from
__IMPORT_DESCRIPTOR_<dll>plus exports from__imp_<name>symbols. Type, ordinal/hint and name-decoration bits are read from the descriptor header, matching the short-format rules already used by theobjectcrate. Short imports and unrecognized members keep their previous behaviour.Tested
x86_64-pc-windows-gnu(no MSVC linker on this machine).cargo test -p victory-pe --lib -- --test-threads=1: 11 passed, 0 failed.cargo check --workspace: clean, no new warnings.rustfmt --edition 2024 --check crates/victory-pe/src/implib.rsandgit diff --check: clean.cargo xtask policy: 154 files ok. No game files or data taken from them were added.Checklist
cargo fmt --all --checkandcargo test --workspacepass — the workspace has pre-existing formatting diffs and the loader fixture needs MSVC/DELAYLOAD, which MinGW rejects here; the changed crate and a fullcargo check --workspaceare clean.cargo xtask policypasses. The change adds no game files or data taken from them (docs/asset-policy.md).@Zipettte on GitHub · 2026-11-24 15:13 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
adeb9ff:cargo test -p victory-pepasses, 11 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
@Marvisak on GitHub · 2026-11-25 00:28 UTC · original
Automated triage for the maintainers. Closing because by our reading the change is incorrect or would break something that works today.
If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed