[JITLink] Add a setProtectionFlags method to jitlink::Section.

This allows clients to modify the memory protection settings on sections via
jitlink passes. This can be used to, for example, override the default settings
on text pages and make them Read/Write/Executable under the JIT.
This commit is contained in:
Lang Hames 2021-03-30 17:53:59 -07:00
parent 9eef0fae2b
commit 3a83b8b2d2
1 changed files with 5 additions and 0 deletions

View File

@ -596,6 +596,11 @@ public:
/// Returns the protection flags for this section.
sys::Memory::ProtectionFlags getProtectionFlags() const { return Prot; }
/// Set the protection flags for this section.
void setProtectionFlags(sys::Memory::ProtectionFlags Prot) {
this->Prot = Prot;
}
/// Returns the ordinal for this section.
SectionOrdinal getOrdinal() const { return SecOrdinal; }