patches/gcc/4.3.6/220-noteGNUstack-01.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Sep 02 13:45:05 2011 +0200 (2011-09-02)
changeset 2670 4ae31a5eb546
parent 2124 patches/gcc/4.3.5/220-noteGNUstack-01.patch@5dd0b83ae528
permissions -rw-r--r--
cc/gcc: propagate 4.3.5 patchset to 4.3.6

They applied cleanly with only offsets

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
thomas@1461
     1
Original patch from: ../4.3.2/220-noteGNUstack-01.patch
thomas@1461
     2
thomas@1461
     3
-= BEGIN original header =-
thomas@1461
     4
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/62_all_gcc4-noteGNUstack.patch
thomas@1461
     5
2005-02-08  Jakub Jelinek  <jakub@redhat.com>
thomas@1461
     6
thomas@1461
     7
	* src/alpha/osf.S: Add .note.GNU-stack on Linux.
thomas@1461
     8
	* src/s390/sysv.S: Likewise.
thomas@1461
     9
	* src/powerpc/linux64.S: Likewise.
thomas@1461
    10
	* src/powerpc/linux64_closure.S: Likewise.
thomas@1461
    11
	* src/powerpc/ppc_closure.S: Likewise.
thomas@1461
    12
	* src/powerpc/sysv.S: Likewise.
thomas@1461
    13
	* src/x86/unix64.S: Likewise.
thomas@1461
    14
	* src/x86/sysv.S: Likewise.
thomas@1461
    15
	* src/sparc/v8.S: Likewise.
thomas@1461
    16
	* src/sparc/v9.S: Likewise.
thomas@1461
    17
	* src/m68k/sysv.S: Likewise.
thomas@1461
    18
	* src/ia64/unix.S: Likewise.
thomas@1461
    19
	* src/arm/sysv.S: Likewise.
thomas@1461
    20
thomas@1461
    21
	* ia64_save_regs_in_stack.s: Moved to...
thomas@1461
    22
	* ia64_save_regs_in_stack.S: ... this.  Add .note.GNU-stack
thomas@1461
    23
	on Linux.
thomas@1461
    24
thomas@1461
    25
-= END original header =-
thomas@1461
    26
thomas@1461
    27
diff -durN gcc-4.3.3.orig/boehm-gc/ia64_save_regs_in_stack.S gcc-4.3.3/boehm-gc/ia64_save_regs_in_stack.S
thomas@1461
    28
--- gcc-4.3.3.orig/boehm-gc/ia64_save_regs_in_stack.S	1970-01-01 01:00:00.000000000 +0100
thomas@1461
    29
+++ gcc-4.3.3/boehm-gc/ia64_save_regs_in_stack.S	2009-01-27 22:25:27.000000000 +0100
thomas@1461
    30
@@ -0,0 +1,15 @@
thomas@1461
    31
+        .text
thomas@1461
    32
+        .align 16
thomas@1461
    33
+        .global GC_save_regs_in_stack
thomas@1461
    34
+        .proc GC_save_regs_in_stack
thomas@1461
    35
+GC_save_regs_in_stack:
thomas@1461
    36
+        .bodyfoo.mpg
thomas@1461
    37
+        flushrs
thomas@1461
    38
+        ;;
thomas@1461
    39
+        mov r8=ar.bsp
thomas@1461
    40
+        br.ret.sptk.few rp
thomas@1461
    41
+        .endp GC_save_regs_in_stack
thomas@1461
    42
+
thomas@1461
    43
+#ifdef __linux__
thomas@1461
    44
+	.section .note.GNU-stack,"",@progbits
thomas@1461
    45
+#endif
thomas@1461
    46
diff -durN gcc-4.3.3.orig/boehm-gc/ia64_save_regs_in_stack.s gcc-4.3.3/boehm-gc/ia64_save_regs_in_stack.s
thomas@1461
    47
--- gcc-4.3.3.orig/boehm-gc/ia64_save_regs_in_stack.s	2001-10-15 06:57:59.000000000 +0200
thomas@1461
    48
+++ gcc-4.3.3/boehm-gc/ia64_save_regs_in_stack.s	1970-01-01 01:00:00.000000000 +0100
thomas@1461
    49
@@ -1,12 +0,0 @@
thomas@1461
    50
-        .text
thomas@1461
    51
-        .align 16
thomas@1461
    52
-        .global GC_save_regs_in_stack
thomas@1461
    53
-        .proc GC_save_regs_in_stack
thomas@1461
    54
-GC_save_regs_in_stack:
thomas@1461
    55
-        .body
thomas@1461
    56
-        flushrs
thomas@1461
    57
-        ;;
thomas@1461
    58
-        mov r8=ar.bsp
thomas@1461
    59
-        br.ret.sptk.few rp
thomas@1461
    60
-        .endp GC_save_regs_in_stack
thomas@1461
    61
-
thomas@1461
    62
diff -durN gcc-4.3.3.orig/libffi/src/alpha/osf.S gcc-4.3.3/libffi/src/alpha/osf.S
thomas@1461
    63
--- gcc-4.3.3.orig/libffi/src/alpha/osf.S	2007-04-06 18:24:16.000000000 +0200
thomas@1461
    64
+++ gcc-4.3.3/libffi/src/alpha/osf.S	2009-01-27 22:25:27.000000000 +0100
thomas@1461
    65
@@ -358,4 +358,8 @@
thomas@1461
    66
 	.byte	16		# uleb128 offset 16*-8
thomas@1461
    67
 	.align 3
thomas@1461
    68
 $LEFDE3:
thomas@1461
    69
+
thomas@1461
    70
+#ifdef __linux__
thomas@1461
    71
+	.section	.note.GNU-stack,"",@progbits
thomas@1461
    72
+#endif
thomas@1461
    73
 #endif
thomas@1461
    74
diff -durN gcc-4.3.3.orig/libffi/src/arm/sysv.S gcc-4.3.3/libffi/src/arm/sysv.S
thomas@1461
    75
--- gcc-4.3.3.orig/libffi/src/arm/sysv.S	2007-09-04 19:52:45.000000000 +0200
thomas@1461
    76
+++ gcc-4.3.3/libffi/src/arm/sysv.S	2009-01-27 22:25:27.000000000 +0100
thomas@1461
    77
@@ -293,3 +293,6 @@
thomas@1461
    78
 	UNWIND .fnend
thomas@1461
    79
         .size    CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV)
thomas@1461
    80
 
thomas@1461
    81
+#if defined __ELF__ && defined __linux__
thomas@1461
    82
+	.section	.note.GNU-stack,"",%progbits
thomas@1461
    83
+#endif
thomas@1461
    84
diff -durN gcc-4.3.3.orig/libffi/src/ia64/unix.S gcc-4.3.3/libffi/src/ia64/unix.S
thomas@1461
    85
--- gcc-4.3.3.orig/libffi/src/ia64/unix.S	2005-03-30 23:49:19.000000000 +0200
thomas@1461
    86
+++ gcc-4.3.3/libffi/src/ia64/unix.S	2009-01-27 22:25:27.000000000 +0100
thomas@1461
    87
@@ -553,3 +553,7 @@
thomas@1461
    88
 	data8	@pcrel(.Lld_hfa_float)		// FFI_IA64_TYPE_HFA_FLOAT
thomas@1461
    89
 	data8	@pcrel(.Lld_hfa_double)		// FFI_IA64_TYPE_HFA_DOUBLE
thomas@1461
    90
 	data8	@pcrel(.Lld_hfa_ldouble)	// FFI_IA64_TYPE_HFA_LDOUBLE
thomas@1461
    91
+
thomas@1461
    92
+#if defined __ELF__ && defined __linux__
thomas@1461
    93
+	.section	.note.GNU-stack,"",@progbits
thomas@1461
    94
+#endif
thomas@1461
    95
diff -durN gcc-4.3.3.orig/libffi/src/m68k/sysv.S gcc-4.3.3/libffi/src/m68k/sysv.S
thomas@1461
    96
--- gcc-4.3.3.orig/libffi/src/m68k/sysv.S	2007-05-10 23:29:04.000000000 +0200
thomas@1461
    97
+++ gcc-4.3.3/libffi/src/m68k/sysv.S	2009-01-27 22:25:27.000000000 +0100
thomas@1461
    98
@@ -207,3 +207,7 @@
thomas@1461
    99
 	rts
thomas@1461
   100
 	CFI_ENDPROC()
thomas@1461
   101
 	.size	ffi_closure_struct_SYSV,.-ffi_closure_struct_SYSV
thomas@1461
   102
+
thomas@1461
   103
+#if defined __ELF__ && defined __linux__
thomas@1461
   104
+	.section	.note.GNU-stack,"",@progbits
thomas@1461
   105
+#endif
thomas@1461
   106
diff -durN gcc-4.3.3.orig/libffi/src/powerpc/linux64.S gcc-4.3.3/libffi/src/powerpc/linux64.S
thomas@1461
   107
--- gcc-4.3.3.orig/libffi/src/powerpc/linux64.S	2007-11-17 00:24:53.000000000 +0100
thomas@1461
   108
+++ gcc-4.3.3/libffi/src/powerpc/linux64.S	2009-01-27 22:25:27.000000000 +0100
thomas@1461
   109
@@ -179,3 +179,7 @@
thomas@1461
   110
 	.align 3
thomas@1461
   111
 .LEFDE1:
thomas@1461
   112
 #endif
thomas@1461
   113
+
thomas@1461
   114
+#if defined __ELF__ && defined __linux__
thomas@1461
   115
+	.section	.note.GNU-stack,"",@progbits
thomas@1461
   116
+#endif
thomas@1461
   117
diff -durN gcc-4.3.3.orig/libffi/src/powerpc/linux64_closure.S gcc-4.3.3/libffi/src/powerpc/linux64_closure.S
thomas@1461
   118
--- gcc-4.3.3.orig/libffi/src/powerpc/linux64_closure.S	2005-08-11 23:18:24.000000000 +0200
thomas@1461
   119
+++ gcc-4.3.3/libffi/src/powerpc/linux64_closure.S	2009-01-27 22:25:27.000000000 +0100
thomas@1461
   120
@@ -204,3 +204,7 @@
thomas@1461
   121
 	.align 3
thomas@1461
   122
 .LEFDE1:
thomas@1461
   123
 #endif
thomas@1461
   124
+
thomas@1461
   125
+#if defined __ELF__ && defined __linux__
thomas@1461
   126
+	.section	.note.GNU-stack,"",@progbits
thomas@1461
   127
+#endif
thomas@1461
   128
diff -durN gcc-4.3.3.orig/libffi/src/powerpc/ppc_closure.S gcc-4.3.3/libffi/src/powerpc/ppc_closure.S
thomas@1461
   129
--- gcc-4.3.3.orig/libffi/src/powerpc/ppc_closure.S	2007-12-01 22:00:04.000000000 +0100
thomas@1461
   130
+++ gcc-4.3.3/libffi/src/powerpc/ppc_closure.S	2009-01-27 22:25:27.000000000 +0100
thomas@1461
   131
@@ -295,3 +295,7 @@
thomas@1461
   132
 .LEFDE1:
thomas@1461
   133
 
thomas@1461
   134
 #endif
thomas@1461
   135
+
thomas@1461
   136
+#if defined __ELF__ && defined __linux__
thomas@1461
   137
+	.section	.note.GNU-stack,"",@progbits
thomas@1461
   138
+#endif
thomas@1461
   139
diff -durN gcc-4.3.3.orig/libffi/src/powerpc/sysv.S gcc-4.3.3/libffi/src/powerpc/sysv.S
thomas@1461
   140
--- gcc-4.3.3.orig/libffi/src/powerpc/sysv.S	2007-12-01 22:00:04.000000000 +0100
thomas@1461
   141
+++ gcc-4.3.3/libffi/src/powerpc/sysv.S	2009-01-27 22:25:27.000000000 +0100
thomas@1461
   142
@@ -223,3 +223,7 @@
thomas@1461
   143
       .align 2
thomas@1461
   144
 .LEFDE1:
thomas@1461
   145
 #endif
thomas@1461
   146
+
thomas@1461
   147
+#if defined __ELF__ && defined __linux__
thomas@1461
   148
+	.section	.note.GNU-stack,"",@progbits
thomas@1461
   149
+#endif
thomas@1461
   150
diff -durN gcc-4.3.3.orig/libffi/src/s390/sysv.S gcc-4.3.3/libffi/src/s390/sysv.S
thomas@1461
   151
--- gcc-4.3.3.orig/libffi/src/s390/sysv.S	2003-10-21 21:01:58.000000000 +0200
thomas@1461
   152
+++ gcc-4.3.3/libffi/src/s390/sysv.S	2009-01-27 22:25:27.000000000 +0100
thomas@1461
   153
@@ -427,3 +427,6 @@
thomas@1461
   154
 
thomas@1461
   155
 #endif
thomas@1461
   156
 
thomas@1461
   157
+#if defined __ELF__ && defined __linux__
thomas@1461
   158
+	.section	.note.GNU-stack,"",@progbits
thomas@1461
   159
+#endif
thomas@1461
   160
diff -durN gcc-4.3.3.orig/libffi/src/sparc/v8.S gcc-4.3.3/libffi/src/sparc/v8.S
thomas@1461
   161
--- gcc-4.3.3.orig/libffi/src/sparc/v8.S	2008-11-21 23:13:13.000000000 +0100
thomas@1461
   162
+++ gcc-4.3.3/libffi/src/sparc/v8.S	2009-01-27 22:25:27.000000000 +0100
thomas@1461
   163
@@ -306,3 +306,7 @@
thomas@1461
   164
 	.byte	0x1f	! uleb128 0x1f
thomas@1461
   165
 	.align	WS
thomas@1461
   166
 .LLEFDE2:
thomas@1461
   167
+
thomas@1461
   168
+#if defined __ELF__ && defined __linux__
thomas@1461
   169
+	.section	.note.GNU-stack,"",@progbits
thomas@1461
   170
+#endif
thomas@1461
   171
diff -durN gcc-4.3.3.orig/libffi/src/sparc/v9.S gcc-4.3.3/libffi/src/sparc/v9.S
thomas@1461
   172
--- gcc-4.3.3.orig/libffi/src/sparc/v9.S	2004-01-25 07:58:33.000000000 +0100
thomas@1461
   173
+++ gcc-4.3.3/libffi/src/sparc/v9.S	2009-01-27 22:25:27.000000000 +0100
thomas@1461
   174
@@ -300,3 +300,7 @@
thomas@1461
   175
 	.align 8
thomas@1461
   176
 .LLEFDE2:
thomas@1461
   177
 #endif
thomas@1461
   178
+
thomas@1461
   179
+#ifdef __linux__
thomas@1461
   180
+	.section	.note.GNU-stack,"",@progbits
thomas@1461
   181
+#endif
thomas@1461
   182
diff -durN gcc-4.3.3.orig/libffi/src/x86/sysv.S gcc-4.3.3/libffi/src/x86/sysv.S
thomas@1461
   183
--- gcc-4.3.3.orig/libffi/src/x86/sysv.S	2008-01-30 15:36:58.000000000 +0100
thomas@1461
   184
+++ gcc-4.3.3/libffi/src/x86/sysv.S	2009-01-27 22:25:27.000000000 +0100
thomas@1461
   185
@@ -430,3 +430,7 @@
thomas@1461
   186
 #endif
thomas@1461
   187
 
thomas@1461
   188
 #endif /* ifndef __x86_64__ */
thomas@1461
   189
+
thomas@1461
   190
+#if defined __ELF__ && defined __linux__
thomas@1461
   191
+	.section	.note.GNU-stack,"",@progbits
thomas@1461
   192
+#endif
thomas@1461
   193
diff -durN gcc-4.3.3.orig/libffi/src/x86/unix64.S gcc-4.3.3/libffi/src/x86/unix64.S
thomas@1461
   194
--- gcc-4.3.3.orig/libffi/src/x86/unix64.S	2005-05-05 06:06:38.000000000 +0200
thomas@1461
   195
+++ gcc-4.3.3/libffi/src/x86/unix64.S	2009-01-27 22:25:27.000000000 +0100
thomas@1461
   196
@@ -410,3 +410,7 @@
thomas@1461
   197
 .LEFDE3:
thomas@1461
   198
 
thomas@1461
   199
 #endif /* __x86_64__ */
thomas@1461
   200
+
thomas@1461
   201
+#if defined __ELF__ && defined __linux__
thomas@1461
   202
+	.section	.note.GNU-stack,"",@progbits
thomas@1461
   203
+#endif