Add .note.GNU-stack section to assembler files to avoid the default behavior
authorKristian Høgsberg <krh@redhat.com>
Mon, 17 Apr 2006 18:58:24 +0000 (18:58 +0000)
committerKristian Høgsberg <krh@redhat.com>
Mon, 17 Apr 2006 18:58:24 +0000 (18:58 +0000)
of requesting executable stacks.

25 files changed:
src/mesa/drivers/dri/r200/r200_vtxtmp_x86.S
src/mesa/drivers/dri/radeon/radeon_vtxtmp_x86.S
src/mesa/glapi/gl_x86-64_asm.py
src/mesa/glapi/gl_x86_asm.py
src/mesa/tnl/t_vtx_x86_gcc.S
src/mesa/x86-64/glapi_x86-64.S
src/mesa/x86-64/xform4.S
src/mesa/x86/3dnow_normal.S
src/mesa/x86/3dnow_xform1.S
src/mesa/x86/3dnow_xform2.S
src/mesa/x86/3dnow_xform3.S
src/mesa/x86/3dnow_xform4.S
src/mesa/x86/common_x86_asm.S
src/mesa/x86/glapi_x86.S
src/mesa/x86/mmx_blend.S
src/mesa/x86/read_rgba_span_x86.S
src/mesa/x86/sse_normal.S
src/mesa/x86/sse_xform1.S
src/mesa/x86/sse_xform2.S
src/mesa/x86/sse_xform3.S
src/mesa/x86/sse_xform4.S
src/mesa/x86/x86_cliptest.S
src/mesa/x86/x86_xform2.S
src/mesa/x86/x86_xform3.S
src/mesa/x86/x86_xform4.S

index 57a35c6..5e33c7b 100644 (file)
@@ -493,3 +493,7 @@ GLOBL( _sse_MultiTexCoord2f_2 )
        ret
 GLOBL( _sse_MultiTexCoord2f_2_end )
 #endif
+
+#if defined (__ELF__) && defined (__linux__)
+       .section .note.GNU-stack,"",%progbits
+#endif
index d2bb1d1..1b43349 100644 (file)
@@ -492,3 +492,7 @@ GLOBL( _sse_MultiTexCoord2f_2 )
        ret
 GLOBL( _sse_MultiTexCoord2f_2_end )
 #endif
+
+#if defined (__ELF__) && defined (__linux__)
+       .section .note.GNU-stack,"",%progbits
+#endif
index 20050ef..ea13d2a 100644 (file)
@@ -190,6 +190,10 @@ class PrintGenericStubs(gl_XML.gl_print_base):
                print ' .long   2,4,20    /* Minimum kernel version w/TLS */'
                print '3:       .p2align 2        /* pad out section */'
                print '#endif /* GLX_USE_TLS */'
+               print ''
+               print '#if defined (__ELF__) && defined (__linux__)'
+               print ' .section .note.GNU-stack,"",%progbits'
+               print '#endif'
                return
 
 
index e62687a..899cce6 100644 (file)
@@ -188,6 +188,10 @@ class PrintGenericStubs(gl_XML.gl_print_base):
                print ' .long   2,4,20    /* Minimum kernel version w/TLS */'
                print '3:       .p2align 2        /* pad out section */'
                print '#endif /* GLX_USE_TLS */'
+               print ''
+               print '#if defined (__ELF__) && defined (__linux__)'
+               print ' .section .note.GNU-stack,"",%progbits'
+               print '#endif'
                return
 
 
index 5f79197..93753be 100644 (file)
@@ -555,3 +555,7 @@ GLOBL( _tnl_x86_dispatch_vertexattribfv )
        ret     $8              /* return */
 GLOBL( _tnl_x86_dispatch_vertexattribfv_end )
 #endif /* defined (STDCALL_API) */
+
+#if defined (__ELF__) && defined (__linux__)
+       .section .note.GNU-stack,"",%progbits
+#endif
index 3443351..d976d53 100644 (file)
@@ -31127,3 +31127,7 @@ GL_PREFIX(BlitFramebufferEXT):
        .long   2,4,20    /* Minimum kernel version w/TLS */
 3:     .p2align 2        /* pad out section */
 #endif /* GLX_USE_TLS */
+       
+#if defined (__ELF__) && defined (__linux__)
+       .section .note.GNU-stack,"",%progbits
+#endif
index 622c3f0..65328f6 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: xform4.S,v 1.1 2005/05/07 16:59:59 brianp Exp $ */
+/* $Id: xform4.S,v 1.2 2006/04/17 18:58:24 krh Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -456,3 +456,7 @@ p4_2d_done:
        ret
                        
 #endif
+       
+#if defined (__ELF__) && defined (__linux__)
+       .section .note.GNU-stack,"",%progbits
+#endif
index 623849d..4345c1b 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: 3dnow_normal.S,v 1.9 2005/01/04 14:33:47 brianp Exp $ */
+/* $Id: 3dnow_normal.S,v 1.10 2006/04/17 18:58:24 krh Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -846,3 +846,7 @@ LLBL (G3R_end):
     RET
 
 #endif
+       
+#if defined (__ELF__) && defined (__linux__)
+       .section .note.GNU-stack,"",%progbits
+#endif
index 57e66e9..22b12cc 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: 3dnow_xform1.S,v 1.3 2005/01/04 14:33:47 brianp Exp $ */
+/* $Id: 3dnow_xform1.S,v 1.4 2006/04/17 18:58:24 krh Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -431,3 +431,7 @@ LLBL( G3TP3R_3 ):
     RET
 
 #endif
+       
+#if defined (__ELF__) && defined (__linux__)
+       .section .note.GNU-stack,"",%progbits
+#endif
index 98c1522..d9e96d0 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: 3dnow_xform2.S,v 1.3 2005/01/04 14:33:47 brianp Exp $ */
+/* $Id: 3dnow_xform2.S,v 1.4 2006/04/17 18:58:24 krh Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -471,3 +471,7 @@ LLBL( G3TPIR_4 ):
     POP_L     ( ESI )
     RET
 #endif
+       
+#if defined (__ELF__) && defined (__linux__)
+       .section .note.GNU-stack,"",%progbits
+#endif
index bc6fd5a..babee1c 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: 3dnow_xform3.S,v 1.4 2005/01/04 14:33:47 brianp Exp $ */
+/* $Id: 3dnow_xform3.S,v 1.5 2006/04/17 18:58:24 krh Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -555,3 +555,7 @@ LLBL( G3TPIR_2 ):
     POP_L     ( ESI )
     RET
 #endif
+       
+#if defined (__ELF__) && defined (__linux__)
+       .section .note.GNU-stack,"",%progbits
+#endif
index b4336cd..b16d2b1 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: 3dnow_xform4.S,v 1.4 2005/01/04 14:33:47 brianp Exp $ */
+/* $Id: 3dnow_xform4.S,v 1.5 2006/04/17 18:58:24 krh Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -564,3 +564,7 @@ LLBL( G3TPIR_2 ):
     POP_L     ( ESI )
     RET
 #endif
+       
+#if defined (__ELF__) && defined (__linux__)
+       .section .note.GNU-stack,"",%progbits
+#endif
index 654b346..ef3cc9e 100644 (file)
@@ -213,3 +213,7 @@ GLNAME( _mesa_test_os_sse_exception_support ):
 
 #endif
 
+       
+#if defined (__ELF__) && defined (__linux__)
+       .section .note.GNU-stack,"",%progbits
+#endif
index 1a46e55..ed79797 100644 (file)
@@ -1156,3 +1156,7 @@ GLNAME(gl_dispatch_functions_end):
        .long   2,4,20    /* Minimum kernel version w/TLS */
 3:     .p2align 2        /* pad out section */
 #endif /* GLX_USE_TLS */
+       
+#if defined(__ELF__) && defined(__linux__)
+       .section .note.GNU-stack,"",%progbits
+#endif
index f7326cd..397d635 100644 (file)
@@ -364,3 +364,7 @@ TWO(MOVQ       ( MM1, REGIND(rgba) ))
 #include "mmx_blendtmp.h"
 
 #endif
+       
+#if defined (__ELF__) && defined (__linux__)
+       .section .note.GNU-stack,"",%progbits
+#endif
index 6b8036e..960cffa 100644 (file)
@@ -687,3 +687,7 @@ _generic_read_RGBA_span_RGB565_MMX:
 #endif
        ret
 #endif /* !defined(__DJGPP__) && !defined(__MINGW32__) */
+       
+#if defined (__ELF__) && defined (__linux__)
+       .section .note.GNU-stack,"",%progbits
+#endif
index 07d831b..066d46e 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: sse_normal.S,v 1.5 2005/01/04 14:33:47 brianp Exp $ */
+/* $Id: sse_normal.S,v 1.6 2006/04/17 18:58:24 krh Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -255,3 +255,7 @@ LLBL(K_G3TNNRR_finish):
        RET
 #undef FRAME_OFFSET
 #endif
+       
+#if defined (__ELF__) && defined (__linux__)
+       .section .note.GNU-stack,"",%progbits
+#endif
index 1795c4c..4051f60 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: sse_xform1.S,v 1.3 2005/01/04 14:33:47 brianp Exp $ */
+/* $Id: sse_xform1.S,v 1.4 2006/04/17 18:58:24 krh Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -440,3 +440,7 @@ LLBL(K_GTP13P3DR_finish):
        RET
 #undef FRAME_OFFSET
 #endif
+       
+#if defined (__ELF__) && defined (__linux__)
+       .section .note.GNU-stack,"",%progbits
+#endif
index 9393668..06fe086 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: sse_xform2.S,v 1.3 2005/01/04 14:33:47 brianp Exp $ */
+/* $Id: sse_xform2.S,v 1.4 2006/04/17 18:58:24 krh Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -459,3 +459,7 @@ LLBL(K_GTP23P3DR_finish):
        RET
 #undef FRAME_OFFSET
 #endif
+       
+#if defined (__ELF__) && defined (__linux__)
+       .section .note.GNU-stack,"",%progbits
+#endif
index db0b3cb..eafbe34 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: sse_xform3.S,v 1.3 2005/01/04 14:33:47 brianp Exp $ */
+/* $Id: sse_xform3.S,v 1.4 2006/04/17 18:58:24 krh Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -505,3 +505,7 @@ LLBL(K_GTP3P3DR_finish):
        RET
 #undef FRAME_OFFSET
 #endif
+       
+#if defined (__ELF__) && defined (__linux__)
+       .section .note.GNU-stack,"",%progbits
+#endif
index aef62b0..24c3231 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: sse_xform4.S,v 1.3 2005/01/04 14:33:47 brianp Exp $ */
+/* $Id: sse_xform4.S,v 1.4 2006/04/17 18:58:24 krh Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -229,3 +229,7 @@ LLBL( sse_identity_done ):
        POP_L( ESI )
        RET
 #endif
+       
+#if defined (__ELF__) && defined (__linux__)
+       .section .note.GNU-stack,"",%progbits
+#endif
index f4038a5..5a45ee6 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: x86_cliptest.S,v 1.11 2005/01/04 14:33:47 brianp Exp $ */
+/* $Id: x86_cliptest.S,v 1.12 2006/04/17 18:58:24 krh Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -401,3 +401,7 @@ LLBL(ctp4_np_finish):
        POP_L( ESI )
 
        RET
+       
+#if defined (__ELF__) && defined (__linux__)
+       .section .note.GNU-stack,"",%progbits
+#endif
index bb255b4..94f6989 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: x86_xform2.S,v 1.3 2005/01/04 14:33:47 brianp Exp $ */
+/* $Id: x86_xform2.S,v 1.4 2006/04/17 18:58:24 krh Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -568,3 +568,7 @@ LLBL(x86_p2_ir_done):
        POP_L( ESI )
        RET
 #undef FRAME_OFFSET
+       
+#if defined (__ELF__) && defined (__linux__)
+       .section .note.GNU-stack,"",%progbits
+#endif
index 6bdec6a..747e2f4 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: x86_xform3.S,v 1.3 2005/01/04 14:33:47 brianp Exp $ */
+/* $Id: x86_xform3.S,v 1.4 2006/04/17 18:58:24 krh Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -638,3 +638,7 @@ LLBL(x86_p3_ir_done):
        POP_L( EDI )
        POP_L( ESI )
        RET
+       
+#if defined (__ELF__) && defined (__linux__)
+       .section .note.GNU-stack,"",%progbits
+#endif
index 61b303a..def3c1c 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: x86_xform4.S,v 1.3 2005/01/04 14:33:47 brianp Exp $ */
+/* $Id: x86_xform4.S,v 1.4 2006/04/17 18:58:24 krh Exp $ */
 
 /*
  * Mesa 3-D graphics library
@@ -671,3 +671,7 @@ LLBL(x86_p4_ir_done):
        POP_L( EDI )
        POP_L( ESI )
        RET
+       
+#if defined (__ELF__) && defined (__linux__)
+       .section .note.GNU-stack,"",%progbits
+#endif