[PATCH] D133010: [lld-macho] Set the SG_READ_ONLY flag on __DATA_CONST

Daniel Bertalan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 31 03:53:52 PDT 2022


BertalanD created this revision.
BertalanD added a reviewer: lld-macho.
Herald added a subscriber: rupprecht.
Herald added a reviewer: jhenderson.
Herald added a reviewer: MaskRay.
Herald added a reviewer: ributzka.
Herald added projects: lld-macho, All.
BertalanD requested review of this revision.
Herald added subscribers: llvm-commits, StephenFan.
Herald added a project: LLVM.

This flag instructs dyld to mark the segment read-only after fixups have
been performed.

I'm not sure why this flag is needed, as on macOS 13 beta at least,
__DATA_CONST is read-only even without this flag, but ld64 sets it as
well.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133010

Files:
  lld/MachO/OutputSegment.cpp
  lld/MachO/OutputSegment.h
  lld/MachO/Writer.cpp
  lld/test/MachO/builtin-rename.s
  llvm/include/llvm/BinaryFormat/MachO.h
  llvm/tools/llvm-objdump/MachODump.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133010.456919.patch
Type: text/x-patch
Size: 3437 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220831/878c1b69/attachment.bin>


More information about the llvm-commits mailing list