[all-commits] [llvm/llvm-project] ac31d6: [LLD][COFF] Avoid resolving symbols with -alternat...
Jacek Caban via All-commits
all-commits at lists.llvm.org
Mon Jul 28 10:26:47 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ac31d64a64e8a648f6834f4cf9de10c56c8d1083
https://github.com/llvm/llvm-project/commit/ac31d64a64e8a648f6834f4cf9de10c56c8d1083
Author: Jacek Caban <jacek at codeweavers.com>
Date: 2025-07-28 (Mon, 28 Jul 2025)
Changed paths:
M lld/COFF/SymbolTable.cpp
A lld/test/COFF/alternatename-alias.s
A lld/test/COFF/alternatename-antidep.s
A lld/test/COFF/alternatename-lib.s
M lld/test/COFF/arm64ec-altnames.s
Log Message:
-----------
[LLD][COFF] Avoid resolving symbols with -alternatename if the target is undefined (#149496)
This change fixes an issue with the use of `-alternatename` in the MSVC
CRT on ARM64EC, where both mangled and demangled symbol names are
specified. Without this patch, the demangled name could be resolved to
an anti-dependency alias of the target. Since chaining anti-dependency
aliases is not allowed, this results in an undefined symbol.
The root cause isn't specific to ARM64EC, it can affect other targets as
well, even when anti-dependency aliases aren't involved. The
accompanying test case demonstrates a scenario where the symbol could be
resolved from an archive. However, because the archive member is pulled
in after the first pass of alternate name resolution, and archive
members don't override weak aliases, eager resolution would incorrectly
skip it.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list