[PATCH] D136202: [Arm64EC] Refer to dllimport'ed functions correctly.
chenglin.bi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 19 20:54:09 PDT 2022
bcl5980 added a comment.
In D136202#3870050 <https://reviews.llvm.org/D136202#3870050>, @efriedma wrote:
> Strange, I didn't see anything like that. Are you sure that adding the symbol to the symbol table solves the issue?
>
> I did see a few weird issues with certain C library functions, but it turned out I could reproduce the same issue with MSVC.
Yeah, for example the arm64ec.exe source code is:
#include <stdio.h>
int __declspec(dllimport) fn(int a);
int main(int argc, const char* argv[])
{
printf("result:%p\n", (void*)fn);
return 0;
}
We will only create symbol `__imp_aux_fn` for now.
The x64 dll source code is:
int __declspec(dllexport) fn(int a)
{
return a + 1;
}
The x64 dll only export the symbol `__imp_fn`.
So, we should export `__imp_fn` in arm64ec.obj I think.
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