thomas@1461: Original patch from: ../4.3.2/210-noteGNUstack-00.patch thomas@1461: thomas@1461: -= BEGIN original header =- thomas@1461: Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/61_all_gcc4-ia64-noteGNUstack.patch thomas@1461: 2004-09-20 Jakub Jelinek thomas@1461: thomas@1461: * config/rs6000/ppc-asm.h: Add .note.GNU-stack section also thomas@1461: on ppc64-linux. thomas@1461: thomas@1461: * config/ia64/lib1funcs.asm: Add .note.GNU-stack section on thomas@1461: ia64-linux. thomas@1461: * config/ia64/crtbegin.asm: Likewise. thomas@1461: * config/ia64/crtend.asm: Likewise. thomas@1461: * config/ia64/crti.asm: Likewise. thomas@1461: * config/ia64/crtn.asm: Likewise. thomas@1461: thomas@1461: 2004-05-14 Jakub Jelinek thomas@1461: thomas@1461: * config/ia64/linux.h (TARGET_ASM_FILE_END): Define. thomas@1461: thomas@1461: -= END original header =- thomas@1461: thomas@1461: diff -durN gcc-4.3.3.orig/gcc/config/ia64/crtbegin.asm gcc-4.3.3/gcc/config/ia64/crtbegin.asm thomas@1461: --- gcc-4.3.3.orig/gcc/config/ia64/crtbegin.asm 2005-09-27 02:52:24.000000000 +0200 thomas@1461: +++ gcc-4.3.3/gcc/config/ia64/crtbegin.asm 2009-01-27 22:19:39.000000000 +0100 thomas@1461: @@ -255,3 +255,7 @@ thomas@1461: .weak __cxa_finalize thomas@1461: #endif thomas@1461: .weak _Jv_RegisterClasses thomas@1461: + thomas@1461: +#ifdef __linux__ thomas@1461: +.section .note.GNU-stack; .previous thomas@1461: +#endif thomas@1461: diff -durN gcc-4.3.3.orig/gcc/config/ia64/crtend.asm gcc-4.3.3/gcc/config/ia64/crtend.asm thomas@1461: --- gcc-4.3.3.orig/gcc/config/ia64/crtend.asm 2005-09-27 02:52:24.000000000 +0200 thomas@1461: +++ gcc-4.3.3/gcc/config/ia64/crtend.asm 2009-01-27 22:19:39.000000000 +0100 thomas@1461: @@ -122,3 +122,7 @@ thomas@1461: thomas@1461: br.ret.sptk.many rp thomas@1461: .endp __do_global_ctors_aux thomas@1461: + thomas@1461: +#ifdef __linux__ thomas@1461: +.section .note.GNU-stack; .previous thomas@1461: +#endif thomas@1461: diff -durN gcc-4.3.3.orig/gcc/config/ia64/crti.asm gcc-4.3.3/gcc/config/ia64/crti.asm thomas@1461: --- gcc-4.3.3.orig/gcc/config/ia64/crti.asm 2005-06-25 03:22:41.000000000 +0200 thomas@1461: +++ gcc-4.3.3/gcc/config/ia64/crti.asm 2009-01-27 22:19:39.000000000 +0100 thomas@1461: @@ -64,3 +64,7 @@ thomas@1461: .body thomas@1461: thomas@1461: # end of crti.asm thomas@1461: + thomas@1461: +#ifdef __linux__ thomas@1461: +.section .note.GNU-stack; .previous thomas@1461: +#endif thomas@1461: diff -durN gcc-4.3.3.orig/gcc/config/ia64/crtn.asm gcc-4.3.3/gcc/config/ia64/crtn.asm thomas@1461: --- gcc-4.3.3.orig/gcc/config/ia64/crtn.asm 2005-06-25 03:22:41.000000000 +0200 thomas@1461: +++ gcc-4.3.3/gcc/config/ia64/crtn.asm 2009-01-27 22:19:39.000000000 +0100 thomas@1461: @@ -54,3 +54,7 @@ thomas@1461: br.ret.sptk.many b0 thomas@1461: thomas@1461: # end of crtn.asm thomas@1461: + thomas@1461: +#ifdef __linux__ thomas@1461: +.section .note.GNU-stack; .previous thomas@1461: +#endif thomas@1461: diff -durN gcc-4.3.3.orig/gcc/config/ia64/lib1funcs.asm gcc-4.3.3/gcc/config/ia64/lib1funcs.asm thomas@1461: --- gcc-4.3.3.orig/gcc/config/ia64/lib1funcs.asm 2005-09-27 02:52:24.000000000 +0200 thomas@1461: +++ gcc-4.3.3/gcc/config/ia64/lib1funcs.asm 2009-01-27 22:19:39.000000000 +0100 thomas@1461: @@ -792,3 +792,7 @@ thomas@1461: } thomas@1461: .endp __floattitf thomas@1461: #endif thomas@1461: + thomas@1461: +#ifdef __linux__ thomas@1461: +.section .note.GNU-stack; .previous thomas@1461: +#endif thomas@1461: diff -durN gcc-4.3.3.orig/gcc/config/ia64/linux.h gcc-4.3.3/gcc/config/ia64/linux.h thomas@1461: --- gcc-4.3.3.orig/gcc/config/ia64/linux.h 2006-12-12 16:15:19.000000000 +0100 thomas@1461: +++ gcc-4.3.3/gcc/config/ia64/linux.h 2009-01-27 22:19:39.000000000 +0100 thomas@1461: @@ -5,6 +5,8 @@ thomas@1461: thomas@1461: #define TARGET_VERSION fprintf (stderr, " (IA-64) Linux"); thomas@1461: thomas@1461: +#define TARGET_ASM_FILE_END file_end_indicate_exec_stack thomas@1461: + thomas@1461: /* This is for -profile to use -lc_p instead of -lc. */ thomas@1461: #undef CC1_SPEC thomas@1461: #define CC1_SPEC "%{profile:-p} %{G*}" thomas@1461: diff -durN gcc-4.3.3.orig/gcc/config/rs6000/ppc-asm.h gcc-4.3.3/gcc/config/rs6000/ppc-asm.h thomas@1461: --- gcc-4.3.3.orig/gcc/config/rs6000/ppc-asm.h 2003-06-04 18:44:51.000000000 +0200 thomas@1461: +++ gcc-4.3.3/gcc/config/rs6000/ppc-asm.h 2009-01-27 22:19:39.000000000 +0100 thomas@1461: @@ -158,7 +158,7 @@ thomas@1461: .size FUNC_NAME(name),GLUE(.L,name)-FUNC_NAME(name) thomas@1461: #endif thomas@1461: thomas@1461: -#if defined __linux__ && !defined __powerpc64__ thomas@1461: +#if defined __linux__ thomas@1461: .section .note.GNU-stack thomas@1461: .previous thomas@1461: #endif