This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PROT_GROWSDOWN


The following change is bogus, _STACK_GROWS_DOWN is defined for i386
in general, but PROT_GROWS{DOWN,UP} are only defined for the GNU/Linux
port, not for GNU/Hurd.

dl-load.c:109: error: `PROT_GROWSDOWN' undeclared here (not in a function)

--- libc/elf/dl-load.c	2004/09/20 07:42:43	1.246
+++ libc/elf/dl-load.c	2004/09/20 15:07:20	1.247
@@ -102,7 +103,13 @@
 #endif
 
 
-extern int __stack_prot attribute_relro attribute_hidden;
+int __stack_prot attribute_hidden attribute_relro
+#if _STACK_GROWS_DOWN
+     = PROT_READ|PROT_WRITE|PROT_GROWSDOWN;
+#elif _STACK_GROWS_UP
+     = PROT_READ|PROT_WRITE|PROT_GROWSUP;
+#endif
+


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]