summaryrefslogtreecommitdiff
path: root/runtime/elf_file.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/elf_file.cc')
-rw-r--r--runtime/elf_file.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/elf_file.cc b/runtime/elf_file.cc
index 4de46e368b..0c8a4f044b 100644
--- a/runtime/elf_file.cc
+++ b/runtime/elf_file.cc
@@ -835,7 +835,7 @@ bool ElfFile::Load(bool executable, std::string* error_msg) {
if ((program_header.p_flags & PF_R) != 0) {
prot |= PROT_READ;
}
- int flags = MAP_FIXED;
+ int flags = 0;
if (writable_) {
prot |= PROT_WRITE;
flags |= MAP_SHARED;
@@ -853,7 +853,7 @@ bool ElfFile::Load(bool executable, std::string* error_msg) {
program_header.p_memsz,
prot, flags, file_->Fd(),
program_header.p_offset,
- true,
+ true, // implies MAP_FIXED
file_->GetPath().c_str(),
error_msg));
if (segment.get() == nullptr) {