diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-05-30 16:14:37 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-05-30 16:14:37 +0200 |
commit | baaede1bf9e8c4180f0c2aed251645e69dfea6bf (patch) | |
tree | b6697c7234f328e0437869e8ecb83d675afb2d48 /AK | |
parent | 8fe72d7b3cfadb66bda77d295fbe178667190444 (diff) | |
download | serenity-baaede1bf9e8c4180f0c2aed251645e69dfea6bf.zip |
Kernel: Make the Process allocate_region* API's understand "int prot".
Instead of having to inspect 'prot' at every call site, make the Process
API's take care of that so we can just pass it through.
Diffstat (limited to 'AK')
-rw-r--r-- | AK/ELF/ELFLoader.cpp | 3 | ||||
-rw-r--r-- | AK/ELF/ELFLoader.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/AK/ELF/ELFLoader.cpp b/AK/ELF/ELFLoader.cpp index a1c6c9a07a..f0f95a506c 100644 --- a/AK/ELF/ELFLoader.cpp +++ b/AK/ELF/ELFLoader.cpp @@ -54,7 +54,8 @@ bool ELFLoader::layout() program_header.offset(), program_header.is_readable(), program_header.is_writable(), - String::format("elf-map-%s%s", program_header.is_readable() ? "r" : "", program_header.is_writable() ? "w" : "") + program_header.is_executable(), + String::format("elf-map-%s%s%s", program_header.is_readable() ? "r" : "", program_header.is_writable() ? "w" : "", program_header.is_writable() ? "x" : "") ); } }); diff --git a/AK/ELF/ELFLoader.h b/AK/ELF/ELFLoader.h index 0eef3b692e..be319425de 100644 --- a/AK/ELF/ELFLoader.h +++ b/AK/ELF/ELFLoader.h @@ -17,7 +17,7 @@ public: bool load(); #if defined(KERNEL) Function<void*(LinearAddress, size_t, size_t, bool, bool, const String&)> alloc_section_hook; - Function<void*(LinearAddress, size_t, size_t, size_t, bool, bool, const String&)> map_section_hook; + Function<void*(LinearAddress, size_t, size_t, size_t, bool r, bool w, bool x, const String&)> map_section_hook; LinearAddress entry() const { return m_image.entry(); } #endif char* symbol_ptr(const char* name); |