[all-commits] [llvm/llvm-project] afdeb4: [lld/mac] Move output segment rename logic into Ou...

Nico Weber via All-commits all-commits at lists.llvm.org
Sun Jul 25 15:21:52 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: afdeb432f0a1e10257862e4a047fc32458f4c124
      https://github.com/llvm/llvm-project/commit/afdeb432f0a1e10257862e4a047fc32458f4c124
  Author: Nico Weber <thakis at chromium.org>
  Date:   2021-07-25 (Sun, 25 Jul 2021)

  Changed paths:
    M lld/MachO/ConcatOutputSection.cpp
    M lld/MachO/OutputSegment.cpp
    M lld/test/MachO/rename.s

  Log Message:
  -----------
  [lld/mac] Move output segment rename logic into OutputSegment

Fixes the output segment name if both -rename_section and
-rename_segment are used and the post-section-rename segment
name is the same as the pre-segment-rename segment name to
match ld64's behavior.

The motivation is that segment$start$ can create section-less segments,
and this makes a corner case in the interaction between segment$start and
-rename_segment in the upcoming segment$start patch.

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




More information about the All-commits mailing list