aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-01-13 15:47:32 +0000
committerUlrich Drepper <drepper@redhat.com>2004-01-13 15:47:32 +0000
commitd1fc817ea459ca28979948fbb23ff58a6f3f4a8c (patch)
treecf1b48823190c07959f8b8b769d096fcd739b2f3 /elf
parent0a182a286d84451b70a40948247319ac9723decb (diff)
downloadglibc-d1fc817ea459ca28979948fbb23ff58a6f3f4a8c.tar
glibc-d1fc817ea459ca28979948fbb23ff58a6f3f4a8c.tar.gz
glibc-d1fc817ea459ca28979948fbb23ff58a6f3f4a8c.tar.bz2
glibc-d1fc817ea459ca28979948fbb23ff58a6f3f4a8c.zip
Update.
2004-01-13 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/dl-execstack.c: Change interface. Add challenge for caller. * sysdeps/generic/ldsodefs.h: Change declaration and type of hook member in rtld_global appropriately. * elf/dl-support.c: Likewise. * elf/dl-load.c (_dl_map_object_from_fd): Take additional paramter. Pass it on to the changed function. (_dl_map_object): Pass new parameter to _dl_map_object_from_fd.
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-load.c9
-rw-r--r--elf/dl-support.c4
2 files changed, 8 insertions, 5 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index dc993a5894..99ca6a054d 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -811,7 +811,7 @@ static
struct link_map *
_dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
char *realname, struct link_map *loader, int l_type,
- int mode)
+ int mode, void **stack_endp)
{
struct link_map *l = NULL;
const ElfW(Ehdr) *header;
@@ -1351,7 +1351,7 @@ cannot allocate TLS data structures for initial thread");
{
/* The stack is presently not executable, but this module
requires that it be executable. */
- errval = (*GL(dl_make_stack_executable_hook)) ();
+ errval = (*GL(dl_make_stack_executable_hook)) (stack_endp);
if (errval)
{
errstring = N_("\
@@ -1949,7 +1949,10 @@ cannot create shared object descriptor"));
N_("cannot open shared object file"));
}
- return _dl_map_object_from_fd (name, fd, &fb, realname, loader, type, mode);
+ extern void *__libc_stack_end;
+ void *stack_end = __libc_stack_end;
+ return _dl_map_object_from_fd (name, fd, &fb, realname, loader, type, mode,
+ &stack_end);
}
INTDEF (_dl_map_object)
diff --git a/elf/dl-support.c b/elf/dl-support.c
index f13fd058a3..aa255b443b 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -1,5 +1,5 @@
/* Support for dynamic linking code in static libc.
- Copyright (C) 1996-2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -136,7 +136,7 @@ ElfW(Word) _dl_stack_flags = PF_R|PF_W|PF_X;
/* If loading a shared object requires that we make the stack executable
when it was not, we do it by calling this function.
It returns an errno code or zero on success. */
-int (*_dl_make_stack_executable_hook) (void) internal_function
+int (*_dl_make_stack_executable_hook) (void **) internal_function
= _dl_make_stack_executable;