[all-commits] [llvm/llvm-project] 58edae: [lld-macho] Do not error out on dead stripped dupl...

Vincent Lee via All-commits all-commits at lists.llvm.org
Fri Sep 30 15:10:19 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 58edaef3fe08b81d9e3c172dd38338508be7ac79
      https://github.com/llvm/llvm-project/commit/58edaef3fe08b81d9e3c172dd38338508be7ac79
  Author: Vincent Lee <leevince at fb.com>
  Date:   2022-09-30 (Fri, 30 Sep 2022)

  Changed paths:
    M lld/MachO/Config.h
    M lld/MachO/Driver.cpp
    M lld/MachO/Options.td
    M lld/MachO/SymbolTable.cpp
    M lld/MachO/SymbolTable.h
    M lld/MachO/Writer.cpp
    M lld/docs/MachO/ld64-vs-lld.rst
    A lld/test/MachO/abs-duplicate.s
    M lld/test/MachO/dead-strip.s
    R lld/test/MachO/invalid/abs-duplicate.s

  Log Message:
  -----------
  [lld-macho] Do not error out on dead stripped duplicate symbols

Builds that error out on duplicate symbols can still succeed if the symbols
will be dead stripped. Currently, this is the current behavior in ld64.
https://github.com/apple-oss-distributions/ld64/blob/main/src/ld/Resolver.cpp#L2018.
In order to provide an easier to path for adoption, introduce a new flag that will
retain compatibility with ld64's behavior (similar to `--deduplicate-literals`). This is
turned off by default since we do not encourage this behavior in the linker.

Reviewed By: #lld-macho, thakis, int3

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




More information about the All-commits mailing list