aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-load.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-load.c')
-rw-r--r--elf/dl-load.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 81c1d8ba2e..e961cb0784 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -848,6 +848,11 @@ _dl_map_object_from_fd (char *name, int fd, char *realname,
__mprotect ((caddr_t) (l->l_addr + c->mapend),
loadcmds[nloadcmds - 1].allocend - c->mapend,
0);
+
+ /* Remember which part of the address space this object uses. */
+ l->l_map_start = c->mapstart + l->l_addr;
+ l->l_map_end = l->l_map_start + maplength;
+
goto postmap;
}
else
@@ -857,6 +862,10 @@ _dl_map_object_from_fd (char *name, int fd, char *realname,
ELF_FIXED_ADDRESS (loader, c->mapstart);
}
+ /* Remember which part of the address space this object uses. */
+ l->l_map_start = c->mapstart + l->l_addr;
+ l->l_map_end = l->l_map_start + maplength;
+
while (c < &loadcmds[nloadcmds])
{
if (c->mapend > c->mapstart)