This file is indexed.

/usr/src/gcc-4.7/debian/patches/note-gnu-stack.diff is in gcc-4.7-source 4.7.4-3ubuntu12.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# DP: Add .note.GNU-stack sections for gcc's crt files, libffi and boehm-gc
# DP: Taken from FC.

gcc/

2004-09-20  Jakub Jelinek  <jakub@redhat.com>

	* config/rs6000/ppc-asm.h: Add .note.GNU-stack section also
	on ppc64-linux.

	* config/ia64/lib1funcs.asm: Add .note.GNU-stack section on
	ia64-linux.
	* config/ia64/crtbegin.asm: Likewise.
	* config/ia64/crtend.asm: Likewise.
	* config/ia64/crti.asm: Likewise.
	* config/ia64/crtn.asm: Likewise.

2004-05-14  Jakub Jelinek  <jakub@redhat.com>

	* config/ia64/linux.h (TARGET_ASM_FILE_END): Define.

boehm-gc/

2005-02-08  Jakub Jelinek  <jakub@redhat.com>

	* ia64_save_regs_in_stack.s: Moved to...
	* ia64_save_regs_in_stack.S: ... this.  Add .note.GNU-stack
	on Linux.

libffi/

2007-05-11  Daniel Jacobowitz  <dan@debian.org>

	* src/arm/sysv.S: Fix ARM comment marker.

2005-02-08  Jakub Jelinek  <jakub@redhat.com>

	* src/alpha/osf.S: Add .note.GNU-stack on Linux.
	* src/s390/sysv.S: Likewise.
	* src/powerpc/linux64.S: Likewise.
	* src/powerpc/linux64_closure.S: Likewise.
	* src/powerpc/ppc_closure.S: Likewise.
	* src/powerpc/sysv.S: Likewise.
	* src/x86/unix64.S: Likewise.
	* src/x86/sysv.S: Likewise.
	* src/sparc/v8.S: Likewise.
	* src/sparc/v9.S: Likewise.
	* src/m68k/sysv.S: Likewise.
	* src/ia64/unix.S: Likewise.
	* src/arm/sysv.S: Likewise.

---
 boehm-gc/ia64_save_regs_in_stack.S   |   15 +++++++++++++++
 boehm-gc/ia64_save_regs_in_stack.s   |   12 ------------
 gcc/config/ia64/linux.h              |    3 +++
 gcc/config/rs6000/ppc-asm.h          |    2 +-
 libgcc/config/ia64/crtbegin.S        |    4 ++++
 libgcc/config/ia64/crtend.S          |    4 ++++
 libgcc/config/ia64/crti.S            |    4 ++++
 libgcc/config/ia64/crtn.S            |    4 ++++
 libgcc/config/ia64/lib1funcs.S       |    4 ++++
 9 files changed, 39 insertions(+), 13 deletions(-)

--- a/src/boehm-gc/ia64_save_regs_in_stack.s
+++ /dev/null
@@ -1,12 +0,0 @@
-        .text
-        .align 16
-        .global GC_save_regs_in_stack
-        .proc GC_save_regs_in_stack
-GC_save_regs_in_stack:
-        .body
-        flushrs
-        ;;
-        mov r8=ar.bsp
-        br.ret.sptk.few rp
-        .endp GC_save_regs_in_stack
-
--- /dev/null
+++ b/src/boehm-gc/ia64_save_regs_in_stack.S
@@ -0,0 +1,15 @@
+        .text
+        .align 16
+        .global GC_save_regs_in_stack
+        .proc GC_save_regs_in_stack
+GC_save_regs_in_stack:
+        .body
+        flushrs
+        ;;
+        mov r8=ar.bsp
+        br.ret.sptk.few rp
+        .endp GC_save_regs_in_stack
+
+#ifdef __linux__
+	.section .note.GNU-stack,"",@progbits
+#endif
--- a/src/libgcc/config/ia64/crtbegin.S
+++ b/src/libgcc/config/ia64/crtbegin.S
@@ -252,3 +252,7 @@
 .weak __cxa_finalize
 #endif
 .weak _Jv_RegisterClasses
+
+#ifdef __linux__
+.section .note.GNU-stack; .previous
+#endif
--- a/src/libgcc/config/ia64/crtend.S
+++ b/src/libgcc/config/ia64/crtend.S
@@ -119,3 +119,7 @@
 
 	br.ret.sptk.many rp
 	.endp __do_global_ctors_aux
+
+#ifdef __linux__
+.section .note.GNU-stack; .previous
+#endif
--- a/src/libgcc/config/ia64/crti.S
+++ b/src/libgcc/config/ia64/crti.S
@@ -51,3 +51,7 @@
 	.body
 
 # end of crti.S
+
+#ifdef __linux__
+.section .note.GNU-stack; .previous
+#endif
--- a/src/libgcc/config/ia64/crtn.S
+++ b/src/libgcc/config/ia64/crtn.S
@@ -41,3 +41,7 @@
 	br.ret.sptk.many b0
 
 # end of crtn.S
+
+#ifdef __linux__
+.section .note.GNU-stack; .previous
+#endif
--- a/src/libgcc/config/ia64/lib1funcs.S
+++ b/src/libgcc/config/ia64/lib1funcs.S
@@ -793,3 +793,7 @@
 	.endp __floattitf
 #endif
 #endif
+
+#ifdef __linux__
+.section .note.GNU-stack; .previous
+#endif
--- a/src/gcc/config/ia64/linux.h
+++ b/src/gcc/config/ia64/linux.h
@@ -86,3 +86,6 @@
 
 #undef TARGET_INIT_LIBFUNCS
 #define TARGET_INIT_LIBFUNCS ia64_soft_fp_init_libfuncs
+
+#undef TARGET_ASM_FILE_END
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
--- a/src/gcc/config/rs6000/ppc-asm.h
+++ b/src/gcc/config/rs6000/ppc-asm.h
@@ -352,7 +352,7 @@
 #endif
 #endif
 
-#if defined __linux__ && !defined __powerpc64__
+#if defined __linux__
 	.section .note.GNU-stack
 	.previous
 #endif