ld: use shared mappings for read-only elf segments
This commit is contained in:
+1
-1
@@ -147,7 +147,7 @@ static int map_image(struct elf_image *image)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int fd = image->e_fd;
|
int fd = image->e_fd;
|
||||||
int flags = MAP_PRIVATE | MAP_EXECUTABLE | MAP_FIXED;
|
int flags = MAP_SHARED | MAP_EXECUTABLE | MAP_FIXED;
|
||||||
|
|
||||||
if (phdr.p_flags & PF_W) {
|
if (phdr.p_flags & PF_W) {
|
||||||
fd = -1;
|
fd = -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user