-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trans: Fix __imp_ creation for i686 MSVC #28741
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
acaee13
to
a1129e3
Compare
@alexcrichton: Something's odd about this: if import stubs on x86 were prefixed with |
Upon closer look, I see that the .rlib defines symbol Looks like we are being screwed up by LLVM's symbol mangling here - I think x86 ABI requires adding a leading underscore, which is done during IR -> asm translation, but before addition of In short, I think your fix works, though the "correct" way is probably this: let prefix = if cx.sess().target.target.target_pointer_width == "32" {
"\x01__imp__"
} else {
"\x01__imp_"
}; (leading |
@bors: r+ a1129e3bb51853845b942ef077be0992a50e5c59 |
Heh, bors ain't listening |
a1129e3
to
fb2f43d
Compare
I suppose this one should be nominated along with #28646? |
Indeed! |
Turns out the symbol names are slightly different on 32-bit than on 64, so the prefix needs to be tweaked just a bit!
fb2f43d
to
25354de
Compare
Turns out the symbol names are slightly different on 32-bit than on 64, so the prefix needs to be tweaked just a bit!
Accepting for backport to beta |
Turns out the symbol names are slightly different on 32-bit than on 64, so the
prefix needs to be tweaked just a bit!