[PATCH] D113771: [ELF] Support the "read-only" memory region attribute

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 12 06:51:37 PST 2021


ikudrin created this revision.
ikudrin added reviewers: MaskRay, peter.smith.
ikudrin added a project: lld.
Herald added subscribers: arichardson, emaste.
ikudrin requested review of this revision.
Herald added a project: LLVM.

The attribute allows (or disallows for the negative case) read-only sections, i.e. ones without the `SHF_WRITE` flag, to be assigned to the memory region. Before the patch, `lld` could put a section in the wrong region or even fail with "error: no memory region specified for section".


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113771

Files:
  lld/ELF/LinkerScript.cpp
  lld/ELF/LinkerScript.h
  lld/ELF/ScriptParser.cpp
  lld/test/ELF/linkerscript/memory-readonly.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113771.386836.patch
Type: text/x-patch
Size: 5383 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211112/9139c828/attachment.bin>


More information about the llvm-commits mailing list