From 664e7d93f93d421225a115a433d0dbbc40444daa Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 20 Sep 2004 15:08:26 +0000 Subject: Update. 2004-09-20 Ulrich Drepper * elf/dl-load.c: Define __stack_prot. * sysdeps/unix/sysv/linux/dl-execstack.c: Don't define __stack_prot here, just declare it. --- ChangeLog | 6 ++++++ elf/dl-load.c | 9 ++++++++- sysdeps/unix/sysv/linux/dl-execstack.c | 7 +------ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index dbd376d369..b3538e315f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-09-20 Ulrich Drepper + + * elf/dl-load.c: Define __stack_prot. + * sysdeps/unix/sysv/linux/dl-execstack.c: Don't define + __stack_prot here, just declare it. + 2004-09-20 Jakub Jelinek * configure.in (libc_cv_z_relro): Only set to yes if linker script diff --git a/elf/dl-load.c b/elf/dl-load.c index 8a5aa21402..fad456f02c 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -34,6 +34,7 @@ #include "dynamic-link.h" #include #include +#include #include @@ -102,7 +103,13 @@ ELF_PREFERRED_ADDRESS_DATA; #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 + /* Type for the buffer we put the ELF header and hopefully the program header. This buffer does not really have to be too large. In most diff --git a/sysdeps/unix/sysv/linux/dl-execstack.c b/sysdeps/unix/sysv/linux/dl-execstack.c index c2b964bf7f..97ff5d0e62 100644 --- a/sysdeps/unix/sysv/linux/dl-execstack.c +++ b/sysdeps/unix/sysv/linux/dl-execstack.c @@ -28,12 +28,7 @@ #include "kernel-features.h" -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 +extern int __stack_prot attribute_relro attribute_hidden; int -- cgit v1.2.3