From 3fb035f6a242b95261c94376f2c4d770f36e4eed Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 6 Jul 2004 22:59:31 +0000 Subject: 2004-05-18 Andreas Schwab * elf/dl-load.c (_dl_map_object_from_fd): Use the end address of the first segment for mprotect, not l_text_end. --- elf/dl-load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'elf/dl-load.c') diff --git a/elf/dl-load.c b/elf/dl-load.c index f85ae586a1..afbb06b9e5 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -1117,7 +1117,7 @@ cannot allocate TLS data structures for initial thread"); 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_text_end, + __mprotect ((caddr_t) (l->l_addr + c->mapend), loadcmds[nloadcmds - 1].allocend - c->mapend, PROT_NONE); -- cgit v1.2.1