On Tue, 3 Mar 2026, LIU Hao wrote:

I remember that, a while ago, Jacek said that unmangled names (without #) are not included in archive headers, and I suspect that's what breaks ARM64EC actually. It's said that when doing a direct call with BL, the mangled name should be used.

Yes, I believe this is the cause.

However, the previous log says

  ld.lld: error: undefined symbol: __mingw_SEH_error_handler (EC symbol)
>>> referenced by C:/a/_temp/msys64/llvm-mingw/arm64ec-w64-mingw32/lib/crt2.o:(.xdata) clang-21: error: linker command failed with exit code 1 (use -v to see invocation)
  make[3]: *** [Makefile:2929: tstmainc.exe] Error 1

where there's `(EC symbol)` so I think that it's really `#__mingw_SEH_error_handler` in assembly.

The "(EC symbol)" part doesn't mean that here.

When doing arm64x linking, i.e. combining native aarch64 and arm64ec objects in the same image, you have two separate symbol tables, one for each architecture type. That means that when you have undefined symbols there, it is unclear which of the symbol namespaces the issue happens in - so we added such context to make it clearer.

When linking a plain arm64ec image (not arm64x), then there's only one single symbol namespace in play - but the disambiguation context is still printed here.

To make it really clear, one should be able to link with -Wl,--no-demangle to make sure the linker really prints the raw symbol name. Or just inspect the relevant object files with "nm".

// Martin



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to