Wrong symbols are referenced for raw-dylib on i686-pc-windows-gnu #138963
Labels
A-linkage
Area: linking into static, shared libraries and binaries
C-bug
Category: This is a bug.
F-raw_dylib
`#![feature(raw_dylib)]`
O-windows-gnu
Toolchain: GNU, Operating system: Windows
O-x86_32
Target: x86 processors, 32 bit (like i686-*) (IA-32)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following code:
With the following dependency:
Also add the following to
Cargo.toml
:Building with
RUSTFLAGS=--cfg=windows_raw_dylib cargo build --target i686-pc-windows-gnu
(enabling raw-dylibs) produces a.a
file that contains an ole32.dll import with the following references (as per llvm-readobj --symbols):The real libole32.a from mingw contains:
IOW, the symbol is decorated in the real library, but is not in the raw-dylib. This can cause problems downstream e.g. when linking with delayload.
See #130586 for a similar problem on i686-pc-windows-msvc that was fixed in 1.84.0.
Cc: @dpaoliello @kennykerr
The text was updated successfully, but these errors were encountered: