[PATCH] D136202: [Arm64EC] Refer to dllimport'ed functions correctly.
chenglin.bi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 20 00:09:49 PDT 2022
bcl5980 added a comment.
In D136202#3870113 <https://reviews.llvm.org/D136202#3870113>, @efriedma wrote:
> The way you're describing the issue doesn't make sense. Both `__imp_` and `__imp_aux_` are "magic" prefixes; they only exist in object files, not linked products (dll/exe).
The `__imp_` prefix symbol also exist in lib files. Link.exe use the lib file as input to link dll.
> That said, if you link an arm64ec binary against an x64 library, link.exe does in fact appear to fail to resolve `__imp_aux_fn` unless `__imp_fn` is also in the symbol table. Note this only applies to linking against x64 libraries; linking against arm64ec libraries works fine (which is why I didn't run into issues when I was testing this). The fact that the behavior depends on how the library is compiled is so inexplicably weird that I have to call it a bug... but Microsoft probably isn't going to help us here, so we probably need to come up with a workaround.
Yeah, that is exactly what I find, ARM64EC binary link a x64 library has this issue.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136202/new/
https://reviews.llvm.org/D136202
More information about the llvm-commits
mailing list