Patches migrated from cvs.devel.redhat.com:/cvs/devel/glibc
[glibc.git] / fedora / glibc-execstack-disable.patch
blobdc0663635f7dfa33441e39b9c84296bd84715e5e
1 --- libc/config.make.in.jj Wed Sep 24 05:39:06 2003
2 +++ libc/config.make.in Wed Sep 24 17:03:11 2003
3 @@ -42,7 +42,7 @@ have-z-nodelete = @libc_cv_z_nodelete@
4 have-z-nodlopen = @libc_cv_z_nodlopen@
5 have-z-initfirst = @libc_cv_z_initfirst@
6 have-z-combreloc = @libc_cv_z_combreloc@
7 -have-z-execstack = @libc_cv_z_execstack@
8 +have-z-execstack = no
9 have-initfini = @libc_cv_have_initfini@
10 have-Bgroup = @libc_cv_Bgroup@
11 need-nopic-initfini = @nopic_initfini@
12 --- libc/linuxthreads/sysdeps/unix/sysv/linux/dl-execstack.c.jj Thu Apr 11 10:25:15 2002
13 +++ libc/linuxthreads/sysdeps/unix/sysv/linux/dl-execstack.c Wed Sep 24 17:45:40 2003
14 @@ -0,0 +1 @@
15 +#include <sysdeps/generic/dl-execstack.c>
16 --- libc/elf/rtld.c.jj Wed Sep 24 05:39:07 2003
17 +++ libc/elf/rtld.c Wed Sep 24 17:52:43 2003
18 @@ -764,6 +764,7 @@ of this helper program; chances are you
19 load the program below unless it has a PT_GNU_STACK indicating
20 nonexecutable stack is ok. */
22 + if (0)
23 for (ph = phdr; ph < &phdr[phnum]; ++ph)
24 if (ph->p_type == PT_GNU_STACK)
26 @@ -929,7 +930,7 @@ of this helper program; chances are you
27 break;
28 #endif
29 case PT_GNU_STACK:
30 - GL(dl_stack_flags) = ph->p_flags;
31 +// GL(dl_stack_flags) = ph->p_flags;
32 break;
34 #ifdef USE_TLS
35 --- libc/elf/dl-support.c.jj Wed Sep 24 06:22:50 2003
36 +++ libc/elf/dl-support.c Wed Sep 24 17:54:05 2003
37 @@ -281,7 +281,7 @@ _dl_non_dynamic_init (void)
38 #endif
40 /* Scan for a program header telling us the stack is nonexecutable. */
41 - if (_dl_phdr != NULL)
42 + if (0 && _dl_phdr != NULL)
43 for (uint_fast16_t i = 0; i < _dl_phnum; ++i)
44 if (_dl_phdr[i].p_type == PT_GNU_STACK)
46 --- libc/elf/dl-load.c.jj 2003-09-24 05:34:10.000000000 -0400
47 +++ libc/elf/dl-load.c 2003-09-24 18:10:41.000000000 -0400
48 @@ -1063,7 +1063,7 @@ cannot allocate TLS data structures for
49 break;
51 case PT_GNU_STACK:
52 - stack_flags = ph->p_flags;
53 +// stack_flags = ph->p_flags;
54 break;
57 @@ -1341,7 +1341,7 @@ cannot allocate TLS data structures for
58 l->l_dev = st.st_dev;
59 l->l_ino = st.st_ino;
61 - if (__builtin_expect ((stack_flags &~ GL(dl_stack_flags)) & PF_X, 0))
62 + if (0 && __builtin_expect ((stack_flags &~ GL(dl_stack_flags)) & PF_X, 0))
64 /* The stack is presently not executable, but this module
65 requires that it be executable. */