PROT_GROWSDOWN

Alfred M. Szmidt ams@kemisten.nu
Mon Sep 20 20:43:00 GMT 2004


Sorry, forgot the purposed patch.  Note that I am _NOT_ fond of it
(the ChangeLog or the patch)...

2004-09-20  Alfred M. Szmidt  <ams@kemisten.nu>

	* elf/dl-load.c: Check if macros PROT_GROWSDOWN and
	PROT_GROWSUP are defined instead of checking for
	_STACK_GROWS_DOWN and _STACK_GROWS_UP; and revert to not
	defining anything if neither is defined.

--- elf/dl-load.c	20 Sep 2004 21:47:52 +0200	1.248
+++ elf/dl-load.c	20 Sep 2004 22:41:12 +0200	
@@ -105,10 +105,12 @@ ELF_PREFERRED_ADDRESS_DATA;
 
 
 int __stack_prot attribute_hidden attribute_relro
-#if _STACK_GROWS_DOWN
+#if PROT_GROWSDOWN
      = PROT_READ|PROT_WRITE|PROT_GROWSDOWN;
-#elif _STACK_GROWS_UP
+#elif PROT_GROWSUP
      = PROT_READ|PROT_WRITE|PROT_GROWSUP;
+#else
+     ;
 #endif
 
 



More information about the Libc-alpha mailing list