[PATCH] D112371: [lld-macho] Don't merge cstrings across different sections

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 23 15:12:00 PDT 2021


int3 created this revision.
int3 added a reviewer: lld-macho.
Herald added a reviewer: gkm.
Herald added a project: lld-macho.
int3 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

I realized that ld64 merges word literals across sections, but
does not do the same for cstring literals. This diff brings us up to
parity + adds a test for the behavior around word literals as well.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112371

Files:
  lld/MachO/Driver.cpp
  lld/MachO/SyntheticSections.cpp
  lld/MachO/SyntheticSections.h
  lld/MachO/Writer.cpp
  lld/test/MachO/cstring-dedup.s
  lld/test/MachO/literal-dedup.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112371.381761.patch
Type: text/x-patch
Size: 10693 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211023/b08622d0/attachment.bin>


More information about the llvm-commits mailing list