[all-commits] [llvm/llvm-project] e49374: [lld-macho] Support common symbols in bitcode (but...

Jez Ng via All-commits all-commits at lists.llvm.org
Thu Jul 29 08:08:08 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e49374f9e0c02dae575f26f969677534b94eac3d
      https://github.com/llvm/llvm-project/commit/e49374f9e0c02dae575f26f969677534b94eac3d
  Author: Jez Ng <jezng at fb.com>
  Date:   2021-07-29 (Thu, 29 Jul 2021)

  Changed paths:
    M lld/MachO/InputFiles.cpp
    A lld/test/MachO/lto-common-symbol-coalescing.ll
    A lld/test/MachO/lto-common-symbol-resolution.ll

  Log Message:
  -----------
  [lld-macho] Support common symbols in bitcode (but differently from ld64)

ld64 seems to handle common symbols in bitcode rather
bizarrely. They follow entirely different precedence rules from their
non-bitcode counterparts. I initially tried to emulate ld64 in D106597,
but I'm not sure the extra complexity is worth it, especially given that
common symbols are not, well, very common.

This diff accords common bitcode symbols the same precedence as regular
common symbols, just as we treat all other pairs of bitcode and
non-bitcode symbol types. The tests document ld64's behavior in detail,
just in case we want to revisit this.

Reviewed By: #lld-macho, thakis

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


  Commit: a26bb9cc056c7ef97247e1a55d3cd71c7d4fb7d6
      https://github.com/llvm/llvm-project/commit/a26bb9cc056c7ef97247e1a55d3cd71c7d4fb7d6
  Author: Jez Ng <jezng at fb.com>
  Date:   2021-07-29 (Thu, 29 Jul 2021)

  Changed paths:
    M lld/test/MachO/common-symbol-coalescing.s

  Log Message:
  -----------
  [lld-macho][nfc] Simplify common-symbol-coalescing test


Compare: https://github.com/llvm/llvm-project/compare/f821a55c5e78...a26bb9cc056c


More information about the All-commits mailing list