patches/gcc/4.3.0/230-noteGNUstack-00.patch
changeset 747 d3e603e7c17c
parent 746 b150d6f590fc
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/gcc/4.3.0/230-noteGNUstack-00.patch	Mon Jul 28 21:32:33 2008 +0000
     1.3 @@ -0,0 +1,96 @@
     1.4 +Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/61_all_gcc4-ia64-noteGNUstack.patch
     1.5 +2004-09-20  Jakub Jelinek  <jakub@redhat.com>
     1.6 +
     1.7 +	* config/rs6000/ppc-asm.h: Add .note.GNU-stack section also
     1.8 +	on ppc64-linux.
     1.9 +
    1.10 +	* config/ia64/lib1funcs.asm: Add .note.GNU-stack section on
    1.11 +	ia64-linux.
    1.12 +	* config/ia64/crtbegin.asm: Likewise.
    1.13 +	* config/ia64/crtend.asm: Likewise.
    1.14 +	* config/ia64/crti.asm: Likewise.
    1.15 +	* config/ia64/crtn.asm: Likewise.
    1.16 +
    1.17 +2004-05-14  Jakub Jelinek  <jakub@redhat.com>
    1.18 +
    1.19 +	* config/ia64/linux.h (TARGET_ASM_FILE_END): Define.
    1.20 +
    1.21 +diff -durN gcc-4.3.0.orig/gcc/config/ia64/crtbegin.asm gcc-4.3.0/gcc/config/ia64/crtbegin.asm
    1.22 +--- gcc-4.3.0.orig/gcc/config/ia64/crtbegin.asm	2005-09-27 02:52:24.000000000 +0200
    1.23 ++++ gcc-4.3.0/gcc/config/ia64/crtbegin.asm	2008-06-10 14:45:02.000000000 +0200
    1.24 +@@ -255,3 +255,7 @@
    1.25 + .weak __cxa_finalize
    1.26 + #endif
    1.27 + .weak _Jv_RegisterClasses
    1.28 ++
    1.29 ++#ifdef __linux__
    1.30 ++.section .note.GNU-stack; .previous
    1.31 ++#endif
    1.32 +diff -durN gcc-4.3.0.orig/gcc/config/ia64/crtend.asm gcc-4.3.0/gcc/config/ia64/crtend.asm
    1.33 +--- gcc-4.3.0.orig/gcc/config/ia64/crtend.asm	2005-09-27 02:52:24.000000000 +0200
    1.34 ++++ gcc-4.3.0/gcc/config/ia64/crtend.asm	2008-06-10 14:45:02.000000000 +0200
    1.35 +@@ -122,3 +122,7 @@
    1.36 + 
    1.37 + 	br.ret.sptk.many rp
    1.38 + 	.endp __do_global_ctors_aux
    1.39 ++
    1.40 ++#ifdef __linux__
    1.41 ++.section .note.GNU-stack; .previous
    1.42 ++#endif
    1.43 +diff -durN gcc-4.3.0.orig/gcc/config/ia64/crti.asm gcc-4.3.0/gcc/config/ia64/crti.asm
    1.44 +--- gcc-4.3.0.orig/gcc/config/ia64/crti.asm	2005-06-25 03:22:41.000000000 +0200
    1.45 ++++ gcc-4.3.0/gcc/config/ia64/crti.asm	2008-06-10 14:45:02.000000000 +0200
    1.46 +@@ -64,3 +64,7 @@
    1.47 + 	.body
    1.48 + 
    1.49 + # end of crti.asm
    1.50 ++
    1.51 ++#ifdef __linux__
    1.52 ++.section .note.GNU-stack; .previous
    1.53 ++#endif
    1.54 +diff -durN gcc-4.3.0.orig/gcc/config/ia64/crtn.asm gcc-4.3.0/gcc/config/ia64/crtn.asm
    1.55 +--- gcc-4.3.0.orig/gcc/config/ia64/crtn.asm	2005-06-25 03:22:41.000000000 +0200
    1.56 ++++ gcc-4.3.0/gcc/config/ia64/crtn.asm	2008-06-10 14:45:02.000000000 +0200
    1.57 +@@ -54,3 +54,7 @@
    1.58 + 	br.ret.sptk.many b0
    1.59 + 
    1.60 + # end of crtn.asm
    1.61 ++
    1.62 ++#ifdef __linux__
    1.63 ++.section .note.GNU-stack; .previous
    1.64 ++#endif
    1.65 +diff -durN gcc-4.3.0.orig/gcc/config/ia64/lib1funcs.asm gcc-4.3.0/gcc/config/ia64/lib1funcs.asm
    1.66 +--- gcc-4.3.0.orig/gcc/config/ia64/lib1funcs.asm	2005-09-27 02:52:24.000000000 +0200
    1.67 ++++ gcc-4.3.0/gcc/config/ia64/lib1funcs.asm	2008-06-10 14:45:02.000000000 +0200
    1.68 +@@ -792,3 +792,7 @@
    1.69 + 	}
    1.70 + 	.endp __floattitf
    1.71 + #endif
    1.72 ++
    1.73 ++#ifdef __linux__
    1.74 ++.section .note.GNU-stack; .previous
    1.75 ++#endif
    1.76 +diff -durN gcc-4.3.0.orig/gcc/config/ia64/linux.h gcc-4.3.0/gcc/config/ia64/linux.h
    1.77 +--- gcc-4.3.0.orig/gcc/config/ia64/linux.h	2006-12-12 16:15:19.000000000 +0100
    1.78 ++++ gcc-4.3.0/gcc/config/ia64/linux.h	2008-06-10 14:45:02.000000000 +0200
    1.79 +@@ -5,6 +5,8 @@
    1.80 + 
    1.81 + #define TARGET_VERSION fprintf (stderr, " (IA-64) Linux");
    1.82 + 
    1.83 ++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
    1.84 ++
    1.85 + /* This is for -profile to use -lc_p instead of -lc.  */
    1.86 + #undef CC1_SPEC
    1.87 + #define CC1_SPEC "%{profile:-p} %{G*}"
    1.88 +diff -durN gcc-4.3.0.orig/gcc/config/rs6000/ppc-asm.h gcc-4.3.0/gcc/config/rs6000/ppc-asm.h
    1.89 +--- gcc-4.3.0.orig/gcc/config/rs6000/ppc-asm.h	2003-06-04 18:44:51.000000000 +0200
    1.90 ++++ gcc-4.3.0/gcc/config/rs6000/ppc-asm.h	2008-06-10 14:45:02.000000000 +0200
    1.91 +@@ -158,7 +158,7 @@
    1.92 + 	.size FUNC_NAME(name),GLUE(.L,name)-FUNC_NAME(name)
    1.93 + #endif
    1.94 + 
    1.95 +-#if defined __linux__ && !defined __powerpc64__
    1.96 ++#if defined __linux__
    1.97 + 	.section .note.GNU-stack
    1.98 + 	.previous
    1.99 + #endif