summaryrefslogtreecommitdiff
path: root/runtime/elf_file.cc
diff options
context:
space:
mode:
author Brian Carlstrom <bdc@google.com> 2014-03-14 23:44:59 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-03-14 23:44:59 +0000
commitd8cc0f874db21a0945c0ee7198bb2ae4a973f70a (patch)
tree069df39819c0f7e8f6f0d4af8569d8a06dafdaf9 /runtime/elf_file.cc
parentb6825e67ea7b85a910258713910a443cfec747e4 (diff)
parent4fb5df8453367aa3f160ac230c03a7a98a28e562 (diff)
Merge "Make MemMap::MapAnonymous() fail if the requested address is not available."
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) {