Skip to content

Include DLL dependencies referenced by PE forwarded exports in package closure #1127

Open

Description

@LunaStev

Problem

The PE reader gathers normal/delay imports but not export forwarder dependencies. A package can include the forwarding DLL and omit the DLL that actually implements the imported function.

Reproduction and evidence

Audited canonical master 69a67c6e0fb700f37ee6114f5a66d37ee13771a5 (0.0.1-alpha-dev). Matching checkout-built compiler/std were used for compiler probes on Linux amd64 with Rust 1.89.0 and LLVM 21.1.8. Artifact inspection, mocked/projection checks and foreign-target object emission are identified below and are not native execution on those operating systems.

Built real MSVC-format fixtures with clang/lld-link: root.exe imports value from a.dll; a.def contains LIBRARY a and EXPORTS value=b.value; b.dll implements value. llvm-readobj --coff-exports a.dll reports ForwardedTo: b.value. Executing windows::dependency_closure([root.exe], "x86_64-pc-windows-msvc", [fixture_dir], []) returns only a.dll. b.dll is absent. No native Windows loader execution was performed.

Scope

Inspect forwarded export dependencies as part of PE closure while retaining current import/delay-import, system DLL and provider conflict rules.

Starting points: tools/src/binary.rs:1, tools/src/windows.rs:60.

Completion criteria

  • The fixture closure includes the required b.dll.
  • Cover forwarded ordinals, transitive/cyclic forwarding and system/API-set policy.
  • Keep unresolved/conflicting providers as errors and verify the final fixture natively on Windows.

Related: #622, #621. Related broad trackers or completed implementations are context, not claims that their entire scope is unfinished.

Activity

  1. added
    bugA problem that causes incorrect behavior or crashes.
    buildIssues related to building the project or compiling errors.
    on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA problem that causes incorrect behavior or crashes.buildIssues related to building the project or compiling errors.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions