[all-commits] [llvm/llvm-project] b34006: [lld][COFF] Add support for overriding weak symbol...

Alan Zhao via All-commits all-commits at lists.llvm.org
Thu Sep 8 10:17:18 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b34006dd0a5126a7b3c2c5ba4d575456ab8a4894
      https://github.com/llvm/llvm-project/commit/b34006dd0a5126a7b3c2c5ba4d575456ab8a4894
  Author: Alan Zhao <ayzhao at google.com>
  Date:   2022-09-08 (Thu, 08 Sep 2022)

  Changed paths:
    M lld/COFF/InputFiles.cpp
    M lld/COFF/SymbolTable.cpp
    M lld/COFF/SymbolTable.h
    M lld/COFF/Symbols.h
    A lld/test/COFF/Inputs/strong-def.ll
    A lld/test/COFF/Inputs/weak-def.ll
    A lld/test/COFF/weak-override.ll

  Log Message:
  -----------
  [lld][COFF] Add support for overriding weak symbols in LLVM bitcode input

LLVM bitcode contains support for weak symbols, so we can add support
for overriding weak symbols in the output COFF even though COFF doesn't
have inherent support for weak symbols.

The motivation for this patch is that Chromium is trying to use libc++'s
assertion handler mechanism, which relies on weak symbols [0], but we're
unable to perform a ThinLTO build on Windows due to this problem [1].

[0]: https://reviews.llvm.org/D121478
[1]: https://crrev.com/c/3863576

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D133165




More information about the All-commits mailing list