aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-load.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-05-05 08:07:07 +0000
committerUlrich Drepper <drepper@redhat.com>2000-05-05 08:07:07 +0000
commitc77ec56d0cd4ae44b03a9eebeeeaaf88850a892d (patch)
tree09dbb36a1f9c670d17006baf64f9c0a8faa6d804 /elf/dl-load.c
parentc0282c0642e99b375ab14fd343aa537445cd72a4 (diff)
downloadglibc-c77ec56d0cd4ae44b03a9eebeeeaaf88850a892d.tar
glibc-c77ec56d0cd4ae44b03a9eebeeeaaf88850a892d.tar.gz
glibc-c77ec56d0cd4ae44b03a9eebeeeaaf88850a892d.tar.bz2
glibc-c77ec56d0cd4ae44b03a9eebeeeaaf88850a892d.zip
Update.
* elf/Makefile (distribute): Add dl-lookupcfg.h. * sysdeps/ia64/Dist: New file.
Diffstat (limited to 'elf/dl-load.c')
-rw-r--r--elf/dl-load.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index f5d91ba6c7..10698ce045 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -922,17 +922,17 @@ _dl_map_object_from_fd (const char *name, int fd, char *realname,
- MAP_BASE_ADDR (l));
/* Remember which part of the address space this object uses. */
- l->l_map_start = map_segment (mappref, maplength, c->prot, 0,
- c->mapoff);
+ l->l_map_start = (ElfW(Addr)) map_segment (mappref, maplength, c->prot,
+ 0, c->mapoff);
l->l_map_end = l->l_map_start + maplength;
- l->l_addr = (ElfW(Addr)) mapat - c->mapstart;
+ l->l_addr = l->l_map_start - c->mapstart;
/* Change protection on the excess portion to disallow all access;
the portions we do not remap later will be inaccessible as if
unallocated. Then jump into the normal segment-mapping loop to
handle the portion of the segment past the end of the file
mapping. */
- __mprotect ((caddr_t) l->l_map_start,
+ __mprotect ((caddr_t) (l->l_addr + c->mapend),
loadcmds[nloadcmds - 1].allocend - c->mapend,
0);