-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Wrong symbols are referenced for raw-dylib on i686-pc-windows-gnu #138963
Copy link
Copy link
Open
Labels
A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.Category: This is a bug.F-raw_dylib`#![feature(raw_dylib)]``#![feature(raw_dylib)]`O-windows-gnuToolchain: GNU, Operating system: WindowsToolchain: GNU, Operating system: WindowsO-x86_32Target: x86 processors, 32 bit (like i686-*) (also known as IA-32, i386, i586, i686)Target: x86 processors, 32 bit (like i686-*) (also known as IA-32, i386, i586, i686)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.Category: This is a bug.F-raw_dylib`#![feature(raw_dylib)]``#![feature(raw_dylib)]`O-windows-gnuToolchain: GNU, Operating system: WindowsToolchain: GNU, Operating system: WindowsO-x86_32Target: x86 processors, 32 bit (like i686-*) (also known as IA-32, i386, i586, i686)Target: x86 processors, 32 bit (like i686-*) (also known as IA-32, i386, i586, i686)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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.afile 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