diff options
author | Roland McGrath <roland@gnu.org> | 2005-04-21 21:49:23 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2005-04-21 21:49:23 +0000 |
commit | 6c6320090733ae6e5edb2e9db7508b454984f11a (patch) | |
tree | 07140a4d9d74ab73a827de48fbf21e21071bf34e | |
parent | 87f37b48fac426c23e2766c99e5868e3905e0c42 (diff) | |
download | glibc-6c6320090733ae6e5edb2e9db7508b454984f11a.tar.gz glibc-6c6320090733ae6e5edb2e9db7508b454984f11a.tar.xz glibc-6c6320090733ae6e5edb2e9db7508b454984f11a.zip |
* elf/dl-load.c (_dl_map_object_from_fd): Don't use MAP_DENYWRITE,
since Linux ignores it in user mmap calls.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | elf/dl-load.c | 8 |
2 files changed, 6 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog index 6624c7bffa..3c69190599 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-04-21 Roland McGrath <roland@redhat.com> + + * elf/dl-load.c (_dl_map_object_from_fd): Don't use MAP_DENYWRITE, + since Linux ignores it in user mmap calls. + 2005-04-17 David S. Miller <davem@davemloft.net> * sysdeps/sparc/sparc32/elf/start.S: Define __data_start. diff --git a/elf/dl-load.c b/elf/dl-load.c index d8b3a56d0d..0d3fbb425b 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -55,12 +55,6 @@ # define MAP_COPY MAP_PRIVATE #endif -/* We want to prevent people from modifying DSOs which are currently in - use. This is what MAP_DENYWRITE is for. */ -#ifndef MAP_DENYWRITE -# define MAP_DENYWRITE 0 -#endif - /* Some systems link their relocatable objects for another base address than 0. We want to know the base address for these such that we can subtract this address from the segment addresses during mapping. @@ -1181,7 +1175,7 @@ cannot allocate TLS data structures for initial thread"); /* Remember which part of the address space this object uses. */ l->l_map_start = (ElfW(Addr)) __mmap ((void *) mappref, maplength, c->prot, - MAP_COPY|MAP_FILE|MAP_DENYWRITE, + MAP_COPY | MAP_FILE, fd, c->mapoff); if (__builtin_expect ((void *) l->l_map_start == MAP_FAILED, 0)) { |