thomas@1461: Original patch from: ../4.3.2/220-noteGNUstack-01.patch thomas@1461: thomas@1461: -= BEGIN original header =- thomas@1461: Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/62_all_gcc4-noteGNUstack.patch thomas@1461: 2005-02-08 Jakub Jelinek thomas@1461: thomas@1461: * src/alpha/osf.S: Add .note.GNU-stack on Linux. thomas@1461: * src/s390/sysv.S: Likewise. thomas@1461: * src/powerpc/linux64.S: Likewise. thomas@1461: * src/powerpc/linux64_closure.S: Likewise. thomas@1461: * src/powerpc/ppc_closure.S: Likewise. thomas@1461: * src/powerpc/sysv.S: Likewise. thomas@1461: * src/x86/unix64.S: Likewise. thomas@1461: * src/x86/sysv.S: Likewise. thomas@1461: * src/sparc/v8.S: Likewise. thomas@1461: * src/sparc/v9.S: Likewise. thomas@1461: * src/m68k/sysv.S: Likewise. thomas@1461: * src/ia64/unix.S: Likewise. thomas@1461: * src/arm/sysv.S: Likewise. thomas@1461: thomas@1461: * ia64_save_regs_in_stack.s: Moved to... thomas@1461: * ia64_save_regs_in_stack.S: ... this. Add .note.GNU-stack thomas@1461: on Linux. thomas@1461: thomas@1461: -= END original header =- thomas@1461: thomas@1461: 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: --- gcc-4.3.3.orig/boehm-gc/ia64_save_regs_in_stack.S 1970-01-01 01:00:00.000000000 +0100 thomas@1461: +++ gcc-4.3.3/boehm-gc/ia64_save_regs_in_stack.S 2009-01-27 22:25:27.000000000 +0100 thomas@1461: @@ -0,0 +1,15 @@ thomas@1461: + .text thomas@1461: + .align 16 thomas@1461: + .global GC_save_regs_in_stack thomas@1461: + .proc GC_save_regs_in_stack thomas@1461: +GC_save_regs_in_stack: thomas@1461: + .bodyfoo.mpg thomas@1461: + flushrs thomas@1461: + ;; thomas@1461: + mov r8=ar.bsp thomas@1461: + br.ret.sptk.few rp thomas@1461: + .endp GC_save_regs_in_stack thomas@1461: + thomas@1461: +#ifdef __linux__ thomas@1461: + .section .note.GNU-stack,"",@progbits thomas@1461: +#endif thomas@1461: 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: --- gcc-4.3.3.orig/boehm-gc/ia64_save_regs_in_stack.s 2001-10-15 06:57:59.000000000 +0200 thomas@1461: +++ gcc-4.3.3/boehm-gc/ia64_save_regs_in_stack.s 1970-01-01 01:00:00.000000000 +0100 thomas@1461: @@ -1,12 +0,0 @@ thomas@1461: - .text thomas@1461: - .align 16 thomas@1461: - .global GC_save_regs_in_stack thomas@1461: - .proc GC_save_regs_in_stack thomas@1461: -GC_save_regs_in_stack: thomas@1461: - .body thomas@1461: - flushrs thomas@1461: - ;; thomas@1461: - mov r8=ar.bsp thomas@1461: - br.ret.sptk.few rp thomas@1461: - .endp GC_save_regs_in_stack thomas@1461: - thomas@1461: diff -durN gcc-4.3.3.orig/libffi/src/alpha/osf.S gcc-4.3.3/libffi/src/alpha/osf.S thomas@1461: --- gcc-4.3.3.orig/libffi/src/alpha/osf.S 2007-04-06 18:24:16.000000000 +0200 thomas@1461: +++ gcc-4.3.3/libffi/src/alpha/osf.S 2009-01-27 22:25:27.000000000 +0100 thomas@1461: @@ -358,4 +358,8 @@ thomas@1461: .byte 16 # uleb128 offset 16*-8 thomas@1461: .align 3 thomas@1461: $LEFDE3: thomas@1461: + thomas@1461: +#ifdef __linux__ thomas@1461: + .section .note.GNU-stack,"",@progbits thomas@1461: +#endif thomas@1461: #endif thomas@1461: diff -durN gcc-4.3.3.orig/libffi/src/arm/sysv.S gcc-4.3.3/libffi/src/arm/sysv.S thomas@1461: --- gcc-4.3.3.orig/libffi/src/arm/sysv.S 2007-09-04 19:52:45.000000000 +0200 thomas@1461: +++ gcc-4.3.3/libffi/src/arm/sysv.S 2009-01-27 22:25:27.000000000 +0100 thomas@1461: @@ -293,3 +293,6 @@ thomas@1461: UNWIND .fnend thomas@1461: .size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV) thomas@1461: thomas@1461: +#if defined __ELF__ && defined __linux__ thomas@1461: + .section .note.GNU-stack,"",%progbits thomas@1461: +#endif thomas@1461: diff -durN gcc-4.3.3.orig/libffi/src/ia64/unix.S gcc-4.3.3/libffi/src/ia64/unix.S thomas@1461: --- gcc-4.3.3.orig/libffi/src/ia64/unix.S 2005-03-30 23:49:19.000000000 +0200 thomas@1461: +++ gcc-4.3.3/libffi/src/ia64/unix.S 2009-01-27 22:25:27.000000000 +0100 thomas@1461: @@ -553,3 +553,7 @@ thomas@1461: data8 @pcrel(.Lld_hfa_float) // FFI_IA64_TYPE_HFA_FLOAT thomas@1461: data8 @pcrel(.Lld_hfa_double) // FFI_IA64_TYPE_HFA_DOUBLE thomas@1461: data8 @pcrel(.Lld_hfa_ldouble) // FFI_IA64_TYPE_HFA_LDOUBLE thomas@1461: + thomas@1461: +#if defined __ELF__ && defined __linux__ thomas@1461: + .section .note.GNU-stack,"",@progbits thomas@1461: +#endif thomas@1461: diff -durN gcc-4.3.3.orig/libffi/src/m68k/sysv.S gcc-4.3.3/libffi/src/m68k/sysv.S thomas@1461: --- gcc-4.3.3.orig/libffi/src/m68k/sysv.S 2007-05-10 23:29:04.000000000 +0200 thomas@1461: +++ gcc-4.3.3/libffi/src/m68k/sysv.S 2009-01-27 22:25:27.000000000 +0100 thomas@1461: @@ -207,3 +207,7 @@ thomas@1461: rts thomas@1461: CFI_ENDPROC() thomas@1461: .size ffi_closure_struct_SYSV,.-ffi_closure_struct_SYSV thomas@1461: + thomas@1461: +#if defined __ELF__ && defined __linux__ thomas@1461: + .section .note.GNU-stack,"",@progbits thomas@1461: +#endif thomas@1461: diff -durN gcc-4.3.3.orig/libffi/src/powerpc/linux64.S gcc-4.3.3/libffi/src/powerpc/linux64.S thomas@1461: --- gcc-4.3.3.orig/libffi/src/powerpc/linux64.S 2007-11-17 00:24:53.000000000 +0100 thomas@1461: +++ gcc-4.3.3/libffi/src/powerpc/linux64.S 2009-01-27 22:25:27.000000000 +0100 thomas@1461: @@ -179,3 +179,7 @@ thomas@1461: .align 3 thomas@1461: .LEFDE1: thomas@1461: #endif thomas@1461: + thomas@1461: +#if defined __ELF__ && defined __linux__ thomas@1461: + .section .note.GNU-stack,"",@progbits thomas@1461: +#endif thomas@1461: 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: --- gcc-4.3.3.orig/libffi/src/powerpc/linux64_closure.S 2005-08-11 23:18:24.000000000 +0200 thomas@1461: +++ gcc-4.3.3/libffi/src/powerpc/linux64_closure.S 2009-01-27 22:25:27.000000000 +0100 thomas@1461: @@ -204,3 +204,7 @@ thomas@1461: .align 3 thomas@1461: .LEFDE1: thomas@1461: #endif thomas@1461: + thomas@1461: +#if defined __ELF__ && defined __linux__ thomas@1461: + .section .note.GNU-stack,"",@progbits thomas@1461: +#endif thomas@1461: 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: --- gcc-4.3.3.orig/libffi/src/powerpc/ppc_closure.S 2007-12-01 22:00:04.000000000 +0100 thomas@1461: +++ gcc-4.3.3/libffi/src/powerpc/ppc_closure.S 2009-01-27 22:25:27.000000000 +0100 thomas@1461: @@ -295,3 +295,7 @@ thomas@1461: .LEFDE1: thomas@1461: thomas@1461: #endif thomas@1461: + thomas@1461: +#if defined __ELF__ && defined __linux__ thomas@1461: + .section .note.GNU-stack,"",@progbits thomas@1461: +#endif thomas@1461: diff -durN gcc-4.3.3.orig/libffi/src/powerpc/sysv.S gcc-4.3.3/libffi/src/powerpc/sysv.S thomas@1461: --- gcc-4.3.3.orig/libffi/src/powerpc/sysv.S 2007-12-01 22:00:04.000000000 +0100 thomas@1461: +++ gcc-4.3.3/libffi/src/powerpc/sysv.S 2009-01-27 22:25:27.000000000 +0100 thomas@1461: @@ -223,3 +223,7 @@ thomas@1461: .align 2 thomas@1461: .LEFDE1: thomas@1461: #endif thomas@1461: + thomas@1461: +#if defined __ELF__ && defined __linux__ thomas@1461: + .section .note.GNU-stack,"",@progbits thomas@1461: +#endif thomas@1461: diff -durN gcc-4.3.3.orig/libffi/src/s390/sysv.S gcc-4.3.3/libffi/src/s390/sysv.S thomas@1461: --- gcc-4.3.3.orig/libffi/src/s390/sysv.S 2003-10-21 21:01:58.000000000 +0200 thomas@1461: +++ gcc-4.3.3/libffi/src/s390/sysv.S 2009-01-27 22:25:27.000000000 +0100 thomas@1461: @@ -427,3 +427,6 @@ thomas@1461: thomas@1461: #endif thomas@1461: thomas@1461: +#if defined __ELF__ && defined __linux__ thomas@1461: + .section .note.GNU-stack,"",@progbits thomas@1461: +#endif thomas@1461: diff -durN gcc-4.3.3.orig/libffi/src/sparc/v8.S gcc-4.3.3/libffi/src/sparc/v8.S thomas@1461: --- gcc-4.3.3.orig/libffi/src/sparc/v8.S 2008-11-21 23:13:13.000000000 +0100 thomas@1461: +++ gcc-4.3.3/libffi/src/sparc/v8.S 2009-01-27 22:25:27.000000000 +0100 thomas@1461: @@ -306,3 +306,7 @@ thomas@1461: .byte 0x1f ! uleb128 0x1f thomas@1461: .align WS thomas@1461: .LLEFDE2: thomas@1461: + thomas@1461: +#if defined __ELF__ && defined __linux__ thomas@1461: + .section .note.GNU-stack,"",@progbits thomas@1461: +#endif thomas@1461: diff -durN gcc-4.3.3.orig/libffi/src/sparc/v9.S gcc-4.3.3/libffi/src/sparc/v9.S thomas@1461: --- gcc-4.3.3.orig/libffi/src/sparc/v9.S 2004-01-25 07:58:33.000000000 +0100 thomas@1461: +++ gcc-4.3.3/libffi/src/sparc/v9.S 2009-01-27 22:25:27.000000000 +0100 thomas@1461: @@ -300,3 +300,7 @@ thomas@1461: .align 8 thomas@1461: .LLEFDE2: thomas@1461: #endif thomas@1461: + thomas@1461: +#ifdef __linux__ thomas@1461: + .section .note.GNU-stack,"",@progbits thomas@1461: +#endif thomas@1461: diff -durN gcc-4.3.3.orig/libffi/src/x86/sysv.S gcc-4.3.3/libffi/src/x86/sysv.S thomas@1461: --- gcc-4.3.3.orig/libffi/src/x86/sysv.S 2008-01-30 15:36:58.000000000 +0100 thomas@1461: +++ gcc-4.3.3/libffi/src/x86/sysv.S 2009-01-27 22:25:27.000000000 +0100 thomas@1461: @@ -430,3 +430,7 @@ thomas@1461: #endif thomas@1461: thomas@1461: #endif /* ifndef __x86_64__ */ thomas@1461: + thomas@1461: +#if defined __ELF__ && defined __linux__ thomas@1461: + .section .note.GNU-stack,"",@progbits thomas@1461: +#endif thomas@1461: diff -durN gcc-4.3.3.orig/libffi/src/x86/unix64.S gcc-4.3.3/libffi/src/x86/unix64.S thomas@1461: --- gcc-4.3.3.orig/libffi/src/x86/unix64.S 2005-05-05 06:06:38.000000000 +0200 thomas@1461: +++ gcc-4.3.3/libffi/src/x86/unix64.S 2009-01-27 22:25:27.000000000 +0100 thomas@1461: @@ -410,3 +410,7 @@ thomas@1461: .LEFDE3: thomas@1461: thomas@1461: #endif /* __x86_64__ */ thomas@1461: + thomas@1461: +#if defined __ELF__ && defined __linux__ thomas@1461: + .section .note.GNU-stack,"",@progbits thomas@1461: +#endif