[PATCH] D113771: [ELF] Support the "read-only" memory region attribute
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 22 11:22:10 PST 2021
MaskRay accepted this revision.
MaskRay added a comment.
> 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.
- i.e. ones without the SHF_WRITE flag
+ i.e. ones without the SHF_WRITE flag (`r`)
================
Comment at: lld/test/ELF/linkerscript/memory-readonly.test:1
+REQUIRES: x86
+
----------------
Suggest renaming this to `memory-neg-attr.test`
We can use this file to test all negative (`!`) attributes, not just readonly.
================
Comment at: lld/test/ELF/linkerscript/memory-readonly.test:30
+ RAM (a!r) : ORIGIN = 0x8000, LENGTH = 0x1000
+ ROM (rx) : ORIGIN = 0x9000, LENGTH = 0x1000
+}
----------------
Optional: can you figure out another memory region to test an attribute other than `!r` in the same test?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113771/new/
https://reviews.llvm.org/D113771
More information about the llvm-commits
mailing list