[all-commits] [llvm/llvm-project] 98bc52: [LLD][COFF] Check both mangled and demangled symbo...

Jacek Caban via All-commits all-commits at lists.llvm.org
Wed Oct 23 04:10:30 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 98bc5295ec2b996965f74e0490340d56c51ec147
      https://github.com/llvm/llvm-project/commit/98bc5295ec2b996965f74e0490340d56c51ec147
  Author: Jacek Caban <jacek at codeweavers.com>
  Date:   2024-10-23 (Wed, 23 Oct 2024)

  Changed paths:
    M lld/COFF/SymbolTable.cpp
    M lld/test/COFF/arm64ec-lib.test

  Log Message:
  -----------
  [LLD][COFF] Check both mangled and demangled symbols before adding a lazy archive symbol to the symbol table on ARM64EC (#113284)

On ARM64EC, a function symbol may appear in both mangled and demangled
forms:
- ARM64EC archives contain only the mangled name, while the demangled
symbol is defined by the object file as an alias.
- x86_64 archives contain only the demangled name (the mangled name is
usually defined by an object referencing the symbol as an alias to a
guess exit thunk).
- ARM64EC import files contain both the mangled and demangled names for
thunks.

If more than one archive defines the same function, this could lead to
different libraries being used for the same function depending on how
they are referenced. Avoid this by checking if the paired symbol is
already defined before adding a symbol to the table.



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