patches/gcc/4.3.5/220-noteGNUstack-01.patch
author "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
Mon Apr 16 15:25:36 2012 +0200 (2012-04-16)
changeset 2941 13e40098fffc
parent 1461 35b30f8fb307
permissions -rw-r--r--
cc/gcc: update Linaro GCC revisions to 2012.04

Update Linaro GCC with the latest available revisions.

The 4.7 revision is also released, but the infrastructure is not yet ready for
it in CT-NG.

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