See https://developercommunity.visualstudio.com/t/Functions-dllimported-from-arm64ec-dlls/10670642 ; the same issue reproduces compiling with clang-cl.  My best explanation for what's happening is that original DLL gets the address of the actual function, but the dllimport is a hybrid_patchable stub the linker implicitly creates.

I'm not sure whether this is a compiler bug, or a linker bug.   I'll update when I have more information.

CC @dpaoliello @cjacek
[arm64ec] Functions dllimport'ed from dlls have inconsistent address
This is a GitHub Issue
repo:llvm-project
owner:llvm
Title : [arm64ec] Functions dllimport'ed from dlls have inconsistent address
Issue date:

--- start body ---
See https://developercommunity.visualstudio.com/t/Functions-dllimported-from-arm64ec-dlls/10670642 ; the same issue reproduces compiling with clang-cl.  My best explanation for what's happening is that original DLL gets the address of the actual function, but the dllimport is a hybrid_patchable stub the linker implicitly creates.

I'm not sure whether this is a compiler bug, or a linker bug.   I'll update when I have more information.

CC @dpaoliello @cjacek
--- end body ---
