summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2004-03-20 20:30:05 +0000
committerRoland McGrath <roland@gnu.org>2004-03-20 20:30:05 +0000
commitfda5aa66ed254b050b45ec827558e355bca74fb6 (patch)
tree57c434d17a4703ab9672863383cb98bf50cc7756
parent2b0a8f45621cb4ea12f29b2d184cdc87385635ff (diff)
downloadglibc-fda5aa66ed254b050b45ec827558e355bca74fb6.tar.gz
glibc-fda5aa66ed254b050b45ec827558e355bca74fb6.tar.xz
glibc-fda5aa66ed254b050b45ec827558e355bca74fb6.zip
(_dl_make_stack_executable): Disable for static linking.
-rw-r--r--sysdeps/mach/hurd/dl-execstack.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/mach/hurd/dl-execstack.c b/sysdeps/mach/hurd/dl-execstack.c
index d5c07369cf..0e82a3f606 100644
--- a/sysdeps/mach/hurd/dl-execstack.c
+++ b/sysdeps/mach/hurd/dl-execstack.c
@@ -35,6 +35,7 @@ _dl_make_stack_executable (void **stack_endp)
     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;
@@ -43,5 +44,9 @@ _dl_make_stack_executable (void **stack_endp)
   GL(dl_stack_flags) |= PF_X;
 
   return 0;
+#else
+  /* We don't bother to implement this for static linking.  */
+  return ENOSYS;
+#endif
 }
 rtld_hidden_def (_dl_make_stack_executable)