This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: PROT_GROWSDOWN
- From: "Alfred M. Szmidt" <ams at kemisten dot nu>
- To: "Alfred M. Szmidt" <ams at kemisten dot nu>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Mon, 20 Sep 2004 22:43:18 +0200
- Subject: Re: PROT_GROWSDOWN
- References: <1095712032.087206.22475.nullmailer@Update.UU.SE>
- Sent-via: "Alfred M. Szmidt" <ams@kemisten.nu>
- Sent-via: libc-alpha@sources.redhat.com
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