Sat Nov 7 16:53:08 2015 UTC ()
Fix inconsistencies with GNU-stack note:
- always use __ELF__ && __linux, not just __ELF__ or just __linux__
- remember to pop back to the previous section where it is missing
XXX: need to file this bug with the GNU folks.


(christos)
diff -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/libgcc/config/alpha/qrnnd.S
diff -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/libgcc/config/i386/morestack.S
diff -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/libitm/config/alpha/sjlj.S
diff -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/libitm/config/arm/sjlj.S
diff -r1.1.1.2 -r1.2 src/external/gpl3/gcc/dist/libitm/config/powerpc/sjlj.S
diff -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/libitm/config/s390/sjlj.S
diff -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/libitm/config/sh/sjlj.S
diff -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/libitm/config/sparc/sjlj.S
diff -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/libitm/config/x86/sjlj.S
diff -r1.2 -r1.3 src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl_amd64.S

cvs diff -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/libgcc/config/alpha/qrnnd.S (expand / switch to context diff)
--- src/external/gpl3/gcc/dist/libgcc/config/alpha/qrnnd.S 2014/03/01 08:41:46 1.1.1.1
+++ src/external/gpl3/gcc/dist/libgcc/config/alpha/qrnnd.S 2015/11/07 16:53:07 1.2
@@ -22,8 +22,9 @@
  # see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
  # <http://www.gnu.org/licenses/>.
 
-#ifdef __ELF__
+#if defined(__ELF__) && defined(__linux__)
 .section .note.GNU-stack,""
+.previous
 #endif
 
         .set noreorder

cvs diff -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/libgcc/config/i386/morestack.S (expand / switch to context diff)
--- src/external/gpl3/gcc/dist/libgcc/config/i386/morestack.S 2014/03/01 08:41:47 1.1.1.1
+++ src/external/gpl3/gcc/dist/libgcc/config/i386/morestack.S 2015/11/07 16:53:07 1.2
@@ -853,7 +853,7 @@
 	.quad	__morestack_load_mmap
 #endif
 
-#ifdef __ELF__
+#if defined(__ELF__) && defined(__linux__)
 	.section	.note.GNU-stack,"",@progbits
 	.section	.note.GNU-split-stack,"",@progbits
 	.section	.note.GNU-no-split-stack,"",@progbits

cvs diff -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/libitm/config/alpha/Attic/sjlj.S (expand / switch to context diff)
--- src/external/gpl3/gcc/dist/libitm/config/alpha/Attic/sjlj.S 2014/03/01 08:41:18 1.1.1.1
+++ src/external/gpl3/gcc/dist/libitm/config/alpha/Attic/sjlj.S 2015/11/07 16:53:08 1.2
@@ -107,6 +107,6 @@
 	ret
 .end GTM_longjmp
 
-#ifdef __linux__
+#if defined(__ELF__) && defined(__linux__)
 .section .note.GNU-stack, "", @progbits
 #endif

cvs diff -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/libitm/config/arm/Attic/sjlj.S (expand / switch to context diff)
--- src/external/gpl3/gcc/dist/libitm/config/arm/Attic/sjlj.S 2014/03/01 08:41:18 1.1.1.1
+++ src/external/gpl3/gcc/dist/libitm/config/arm/Attic/sjlj.S 2015/11/07 16:53:08 1.2
@@ -159,6 +159,6 @@
 	cfi_endproc
 	.size	GTM_longjmp, . - GTM_longjmp
 
-#ifdef __linux__
+#if defined(__ELF__) && defined(__linux__)
 .section .note.GNU-stack, "", %progbits
 #endif

cvs diff -r1.1.1.2 -r1.2 src/external/gpl3/gcc/dist/libitm/config/powerpc/Attic/sjlj.S (expand / switch to context diff)
--- src/external/gpl3/gcc/dist/libitm/config/powerpc/Attic/sjlj.S 2014/05/27 08:40:03 1.1.1.2
+++ src/external/gpl3/gcc/dist/libitm/config/powerpc/Attic/sjlj.S 2015/11/07 16:53:08 1.2
@@ -428,6 +428,6 @@
 	cfi_endproc
 END GTM_longjmp
 
-#ifdef __linux__
+#if defined(__ELF__) && defined(__linux__)
 .section .note.GNU-stack, "", @progbits
 #endif

cvs diff -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/libitm/config/s390/Attic/sjlj.S (expand / switch to context diff)
--- src/external/gpl3/gcc/dist/libitm/config/s390/Attic/sjlj.S 2014/03/01 08:41:18 1.1.1.1
+++ src/external/gpl3/gcc/dist/libitm/config/s390/Attic/sjlj.S 2015/11/07 16:53:08 1.2
@@ -105,4 +105,6 @@
 
 	.size GTM_longjmp, .-GTM_longjmp
 
+#if defined(__ELF__) && defined(__linux__)
 	.section .note.GNU-stack, "", @progbits
+#endif

cvs diff -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/libitm/config/sh/Attic/sjlj.S (expand / switch to context diff)
--- src/external/gpl3/gcc/dist/libitm/config/sh/Attic/sjlj.S 2014/03/01 08:41:18 1.1.1.1
+++ src/external/gpl3/gcc/dist/libitm/config/sh/Attic/sjlj.S 2015/11/07 16:53:08 1.2
@@ -117,6 +117,6 @@
 
 	.size	GTM_longjmp, . - GTM_longjmp
 
-#ifdef __linux__
+#if defined(__ELF__) && defined(__linux__)
 .section .note.GNU-stack, "", %progbits
 #endif

cvs diff -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/libitm/config/sparc/Attic/sjlj.S (expand / switch to context diff)
--- src/external/gpl3/gcc/dist/libitm/config/sparc/Attic/sjlj.S 2014/03/01 08:41:18 1.1.1.1
+++ src/external/gpl3/gcc/dist/libitm/config/sparc/Attic/sjlj.S 2015/11/07 16:53:08 1.2
@@ -92,6 +92,6 @@
 	cfi_endproc
 	.size GTM_longjmp, . - GTM_longjmp
 
-#ifdef __linux__
+#if defined(__ELF__) && defined(__linux__)
 	.section .note.GNU-stack, "", @progbits
 #endif

cvs diff -r1.1.1.1 -r1.2 src/external/gpl3/gcc/dist/libitm/config/x86/Attic/sjlj.S (expand / switch to context diff)
--- src/external/gpl3/gcc/dist/libitm/config/x86/Attic/sjlj.S 2014/03/01 08:41:18 1.1.1.1
+++ src/external/gpl3/gcc/dist/libitm/config/x86/Attic/sjlj.S 2015/11/07 16:53:08 1.2
@@ -142,6 +142,6 @@
 	HIDDEN(GTM_longjmp)
 	SIZE(GTM_longjmp)
 
-#ifdef __linux__
+#if defined(__ELF__) && defined(__linux__)
 .section .note.GNU-stack, "", @progbits
 #endif

cvs diff -r1.2 -r1.3 src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl_amd64.S (expand / switch to context diff)
--- src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl_amd64.S 2015/01/25 20:06:46 1.2
+++ src/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl_amd64.S 2015/11/07 16:53:08 1.3
@@ -166,7 +166,7 @@
   ret
   .cfi_endproc
 
-#ifdef __linux__
+#if defined(__ELF__) && defined(__linux__)
 /* We do not need executable stack.  */
 .section        .note.GNU-stack,"",@progbits
 #endif