[all-commits] [llvm/llvm-project] 6e2804: [LLD] Add support for --unique option

David Bozier via All-commits all-commits at lists.llvm.org
Tue Mar 10 05:20:43 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6e2804ce6baa3090399ccf67a2d672c50fd87447
      https://github.com/llvm/llvm-project/commit/6e2804ce6baa3090399ccf67a2d672c50fd87447
  Author: David Bozier <daveb at graphcore.ai>
  Date:   2020-03-10 (Tue, 10 Mar 2020)

  Changed paths:
    M lld/ELF/Config.h
    M lld/ELF/Driver.cpp
    M lld/ELF/LinkerScript.cpp
    M lld/ELF/Options.td
    M lld/docs/ld.lld.1
    A lld/test/ELF/unique-orphans.s

  Log Message:
  -----------
  [LLD] Add support for --unique option

Summary:
Places orphan sections into a unique output section. This prevents the merging of orphan sections of the same name.
Matches behaviour of GNU ld --unique. --unique=pattern is not implemented.

Motivated user case shown in the test has 2 local symbols as they would appear if C++ source has been compiled with -ffunction-sections. The merging of these sections in the case of a partial link (-r) may limit the effectiveness of -gc-sections of a subsequent link.

Reviewers: espindola, jhenderson, bd1976llvm, edd, andrewng, JonChesterfield, MaskRay, grimar, ruiu, psmith

Reviewed By: MaskRay, grimar

Subscribers: emaste, arichardson, MaskRay, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list