Revert "Mark executable maps with no name as unreadable."
This reverts commit 3d93db252dee4ff9476d6b47505a094dfe3be85c.
(cherry picked from commit 7fa112bebf90df78f828d6e124400822e26aabca)
Change-Id: I69837dd96f3cfd413682723351093a1e41292a1b
diff --git a/src/os-linux.c b/src/os-linux.c
index 7a54faa..0a58470 100644
--- a/src/os-linux.c
+++ b/src/os-linux.c
@@ -75,8 +75,8 @@
&& strncmp ("ashmem/", cur_map->path + 5, 7) != 0)
cur_map->flags |= MAP_FLAGS_DEVICE_MEM;
- /* Remove readable bit from any empty map or a map ending in (deleted)
- that is not executable and is not a shared library. The shared library
+ /* Remove readable bit from any map ending in (deleted) that is
+ not executable and is not a shared library. The shared library
restriction is so that if a shared library has been deleted,
the unwind from memory can still access the other possible
shared memory readable segments. */
@@ -91,8 +91,6 @@
SHARED_LIB, sizeof(SHARED_LIB) - 1) != 0) {
cur_map->flags &= ~PROT_READ;
}
- } else if (path_len == 0 && (cur_map->flags & PROT_EXEC)) {
- cur_map->flags &= ~PROT_READ;
}
/* If this is a readable executable map, and not a stack map or an