Back to index

glibc  2.9
Functions | Variables
dl-execstack.c File Reference
#include <ldsodefs.h>
#include <hurdstartup.h>
#include <errno.h>

Go to the source code of this file.


int internal_function _dl_make_stack_executable (void **stack_endp)


struct hurd_startup_data

Function Documentation

Definition at line 31 of file dl-execstack.c.

  /* Challenge the caller.  */
  if (__builtin_expect (*stack_endp != __libc_stack_end, 0))
    return EPERM;
  *stack_endp = NULL;

#ifdef IS_IN_rtld
  if (__mprotect ((void *)_dl_hurd_data->stack_base, _dl_hurd_data->stack_size,
                PROT_READ|PROT_WRITE|PROT_EXEC) != 0)
    return errno;

  /* Remember that we changed the permission.  */
  GL(dl_stack_flags) |= PF_X;

  return 0;
  /* We don't bother to implement this for static linking.  */
  return ENOSYS;

Here is the call graph for this function:

Variable Documentation

Definition at line 25 of file init-first.c.