PE: keep every name for a shared export ordinal #555
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!555
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/555/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?
@Quat3rnion on GitHub · 2026-11-24 04:50 UTC · original
Quat3rnion:victory-export-aliases→main· +79 −24 · 1 files · 1 commits · merged 2026-11-25 00:11 UTCWhat
ImageInfo::parseused the PE-specific export table, which keeps one nameper address-table slot. When two names aliased one ordinal, the earlier name
was silently dropped from
ImageInfo::exportsand fromvictory inspect --exports. The genericObject::exportsiterator yields every named export(and then ordinal-only entries), so the parser now uses it and maps its
target and flags back to our representation. A synthetic PE with two names
for one ordinal plus a separate export covers the alias case.
An AI tool wrote part of this change.
Tested
cargo test --workspace: 165 passed, 0 failed, 3 ignored. The new regression asserts all three names and their RVAs survive parsing.cargo check --target x86_64-pc-windows-gnu --workspace --testspasses. No Windows host here.cargo xtask policypasses (150 files ok). No game files or data from them were added.Checklist
cargo xtask policypasses. No game files or data from them were added.@sebastianspicker on GitHub · 2026-11-24 11:02 UTC · original
Tested
b71c252applied ontomainffe310e(macOS, Rust 1.98.1).mainexactly as described:[("beta", 1, 0x1200), ("gamma", 2, 0x1204)], so "alpha" is dropped. It passes with the PR.Address(0)slots itself.object0.41'sPeExportIteratorstill skips zero addresses in its ordinal-only pass (export.rs,address == 0 => continue), andunused_export_slots_are_not_exportsstill passes, so the gap handling isn't lost. The only difference is a named entry pointing at a zero slot, which is malformed anyway.victory inspect --exports, so that's cosmetic.cargo clippy -p victory-pe --all-targets -D warnings: clean on macOS and forx86_64-pc-windows-msvc(with-p victory).Looks good to me.
AI-assisted.