mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
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.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||
|
||||
@ -661,10 +661,16 @@ __deallocate_stack (struct pthread *pd)
|
||||
}
|
||||
|
||||
|
||||
extern void *__libc_stack_end;
|
||||
|
||||
int
|
||||
internal_function
|
||||
__make_stacks_executable (void)
|
||||
__make_stacks_executable (void **stack_endp)
|
||||
{
|
||||
/* Challenge the caller. */
|
||||
if (*stack_endp != __libc_stack_end)
|
||||
return EPERM;
|
||||
|
||||
#ifdef NEED_SEPARATE_REGISTER_STACK
|
||||
const size_t pagemask = ~(__getpagesize () - 1);
|
||||
#endif
|
||||
@ -702,7 +708,7 @@ __make_stacks_executable (void)
|
||||
lll_unlock (stack_cache_lock);
|
||||
|
||||
if (err == 0)
|
||||
err = _dl_make_stack_executable ();
|
||||
err = _dl_make_stack_executable (stack_endp);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
Reference in New Issue
Block a user