Prechádzať zdrojové kódy

Enable stack protection in all .S files

Hardware stack protection is required by most distributions.
See https://wiki.gentoo.org/wiki/Project:Hardened/GNU_stack_quickstart
Milan Bouchet-Valat 11 rokov pred
rodič
commit
0affa5be19
73 zmenil súbory, kde vykonal 298 pridanie a 0 odobranie
  1. 4 0
      amd64/e_remainder.S
  2. 4 0
      amd64/e_remainderf.S
  3. 4 0
      amd64/e_remainderl.S
  4. 4 0
      amd64/e_sqrt.S
  5. 4 0
      amd64/e_sqrtf.S
  6. 4 0
      amd64/e_sqrtl.S
  7. 4 0
      amd64/s_llrint.S
  8. 4 0
      amd64/s_llrintf.S
  9. 4 0
      amd64/s_llrintl.S
  10. 4 0
      amd64/s_logbl.S
  11. 4 0
      amd64/s_lrint.S
  12. 4 0
      amd64/s_lrintf.S
  13. 4 0
      amd64/s_lrintl.S
  14. 4 0
      amd64/s_remquo.S
  15. 4 0
      amd64/s_remquof.S
  16. 4 0
      amd64/s_remquol.S
  17. 4 0
      amd64/s_rintl.S
  18. 4 0
      amd64/s_scalbn.S
  19. 4 0
      amd64/s_scalbnf.S
  20. 4 0
      amd64/s_scalbnl.S
  21. 5 0
      i387/e_exp.S
  22. 4 0
      i387/e_fmod.S
  23. 4 0
      i387/e_log.S
  24. 4 0
      i387/e_log10.S
  25. 4 0
      i387/e_log10f.S
  26. 4 0
      i387/e_logf.S
  27. 4 0
      i387/e_remainder.S
  28. 4 0
      i387/e_remainderf.S
  29. 4 0
      i387/e_remainderl.S
  30. 4 0
      i387/e_sqrt.S
  31. 4 0
      i387/e_sqrtf.S
  32. 4 0
      i387/e_sqrtl.S
  33. 4 0
      i387/s_ceil.S
  34. 4 0
      i387/s_ceilf.S
  35. 4 0
      i387/s_ceill.S
  36. 4 0
      i387/s_copysign.S
  37. 4 0
      i387/s_copysignf.S
  38. 4 0
      i387/s_copysignl.S
  39. 4 0
      i387/s_cos.S
  40. 4 0
      i387/s_finite.S
  41. 4 0
      i387/s_floor.S
  42. 4 0
      i387/s_floorf.S
  43. 4 0
      i387/s_floorl.S
  44. 4 0
      i387/s_llrint.S
  45. 4 0
      i387/s_llrintf.S
  46. 4 0
      i387/s_llrintl.S
  47. 4 0
      i387/s_logb.S
  48. 4 0
      i387/s_logbf.S
  49. 4 0
      i387/s_logbl.S
  50. 4 0
      i387/s_lrint.S
  51. 4 0
      i387/s_lrintf.S
  52. 4 0
      i387/s_lrintl.S
  53. 4 0
      i387/s_remquo.S
  54. 4 0
      i387/s_remquof.S
  55. 4 0
      i387/s_remquol.S
  56. 4 0
      i387/s_rint.S
  57. 4 0
      i387/s_rintf.S
  58. 4 0
      i387/s_rintl.S
  59. 4 0
      i387/s_scalbn.S
  60. 4 0
      i387/s_scalbnf.S
  61. 4 0
      i387/s_scalbnl.S
  62. 4 0
      i387/s_significand.S
  63. 4 0
      i387/s_significandf.S
  64. 4 0
      i387/s_sin.S
  65. 4 0
      i387/s_tan.S
  66. 4 0
      i387/s_trunc.S
  67. 4 0
      i387/s_truncf.S
  68. 4 0
      i387/s_truncl.S
  69. 5 0
      ia64/s_fma.S
  70. 5 0
      ia64/s_fmaf.S
  71. 5 0
      ia64/s_fmal.S
  72. 5 0
      sparc64/e_sqrt.S
  73. 5 0
      sparc64/e_sqrtf.S

+ 4 - 0
amd64/e_remainder.S

@@ -24,3 +24,7 @@ ENTRY(remainder)
 	ret
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
amd64/e_remainderf.S

@@ -23,3 +23,7 @@ ENTRY(remainderf)
 	ret
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
amd64/e_remainderl.S

@@ -29,3 +29,7 @@ ENTRY(remainderl)
 	ret
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
amd64/e_sqrt.S

@@ -34,3 +34,7 @@ END(sqrt)
 
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
amd64/e_sqrtf.S

@@ -33,3 +33,7 @@ ENTRY(sqrtf)
 END(sqrtf)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
amd64/e_sqrtl.S

@@ -40,3 +40,7 @@ ENTRY(sqrtl)
 #endif
 	ret
 
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
amd64/s_llrint.S

@@ -6,3 +6,7 @@ ENTRY(llrint)
 	ret
 END(llrint)
 
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
amd64/s_llrintf.S

@@ -6,3 +6,7 @@ ENTRY(llrintf)
 	ret
 END(llrintf)
 
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
amd64/s_llrintl.S

@@ -39,3 +39,7 @@ ENTRY(llrintl)
 	ret
 
 
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
amd64/s_logbl.S

@@ -23,3 +23,7 @@ ENTRY(logbl)
 	ret
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
amd64/s_lrint.S

@@ -38,3 +38,7 @@ ENTRY(lrint)
 END(lrint)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
amd64/s_lrintf.S

@@ -38,3 +38,7 @@ ENTRY(lrintf)
 END(lrintf)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
amd64/s_lrintl.S

@@ -39,3 +39,7 @@ ENTRY(lrintl)
 	ret
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
amd64/s_remquo.S

@@ -70,3 +70,7 @@ ENTRY(remquo)
 END(remquo)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
amd64/s_remquof.S

@@ -70,3 +70,7 @@ ENTRY(remquof)
 END(remquof)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
amd64/s_remquol.S

@@ -75,3 +75,7 @@ ENTRY(remquol)
 	ret
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
amd64/s_rintl.S

@@ -20,3 +20,7 @@ ENTRY(rintl)
 	ret
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
amd64/s_scalbn.S

@@ -45,3 +45,7 @@ END(scalbn)
 
 .globl CNAME(ldexp)
 .set   CNAME(ldexp),CNAME(scalbn)
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
amd64/s_scalbnf.S

@@ -47,3 +47,7 @@ END(scalbnf)
 .set	CNAME(ldexpf),CNAME(scalbnf)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
amd64/s_scalbnl.S

@@ -32,3 +32,7 @@ END(scalbnl)
 .set	CNAME(ldexpl),CNAME(scalbnl)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 5 - 0
i387/e_exp.S

@@ -69,3 +69,8 @@ x_not_minus_Inf:
 END(exp)
 
     //
+
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/e_fmod.S

@@ -19,3 +19,7 @@ ENTRY(fmod)
 END(fmod)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/e_log.S

@@ -15,3 +15,7 @@ ENTRY(log)
 END(log)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/e_log10.S

@@ -15,3 +15,7 @@ ENTRY(log10)
 END(log10)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/e_log10f.S

@@ -16,3 +16,7 @@ ENTRY(log10f)
 END(log10f)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/e_logf.S

@@ -15,3 +15,7 @@ ENTRY(logf)
 	ret
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/e_remainder.S

@@ -19,3 +19,7 @@ ENTRY(remainder)
 END(remainder)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/e_remainderf.S

@@ -20,3 +20,7 @@ ENTRY(remainderf)
 END(remainderf)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/e_remainderl.S

@@ -19,3 +19,7 @@ ENTRY(remainderl)
 	ret
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/e_sqrt.S

@@ -14,3 +14,7 @@ ENTRY(sqrt)
 END(sqrt)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/e_sqrtf.S

@@ -15,3 +15,7 @@ ENTRY(sqrtf)
 END(sqrtf)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/e_sqrtl.S

@@ -13,3 +13,7 @@ ENTRY(sqrtl)
 	ret
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_ceil.S

@@ -28,3 +28,7 @@ ENTRY(ceil)
 END(ceil)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_ceilf.S

@@ -30,3 +30,7 @@ ENTRY(ceilf)
 END(ceilf)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_ceill.S

@@ -28,3 +28,7 @@ ENTRY(ceill)
 END(ceill)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_copysign.S

@@ -19,3 +19,7 @@ ENTRY(copysign)
 END(copysign)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_copysignf.S

@@ -20,3 +20,7 @@ ENTRY(copysignf)
 END(copysignf)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_copysignl.S

@@ -18,3 +18,7 @@ ENTRY(copysignl)
 END(copysignl)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_cos.S

@@ -27,3 +27,7 @@ ENTRY(cos)
 END(cos)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_finite.S

@@ -17,3 +17,7 @@ ENTRY(finite)
 END(finite)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_floor.S

@@ -29,3 +29,7 @@ ENTRY(floor)
 END(floor)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_floorf.S

@@ -30,3 +30,7 @@ ENTRY(floorf)
 END(floorf)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_floorl.S

@@ -28,3 +28,7 @@ ENTRY(floorl)
 END(floorl)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_llrint.S

@@ -37,3 +37,7 @@ ENTRY(llrint)
 END(llrint)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_llrintf.S

@@ -37,3 +37,7 @@ ENTRY(llrintf)
 END(llrintf)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_llrintl.S

@@ -36,3 +36,7 @@ ENTRY(llrintl)
 	ret
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_logb.S

@@ -15,3 +15,7 @@ ENTRY(logb)
 END(logb)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_logbf.S

@@ -16,3 +16,7 @@ ENTRY(logbf)
 END(logbf)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_logbl.S

@@ -14,3 +14,7 @@ ENTRY(logbl)
 	ret
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_lrint.S

@@ -36,3 +36,7 @@ ENTRY(lrint)
 END(lrint)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_lrintf.S

@@ -36,3 +36,7 @@ ENTRY(lrintf)
 END(lrintf)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_lrintl.S

@@ -35,3 +35,7 @@ ENTRY(lrintl)
 	ret
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_remquo.S

@@ -63,3 +63,7 @@ ENTRY(remquo)
 END(remquo)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_remquof.S

@@ -63,3 +63,7 @@ ENTRY(remquof)
 END(remquof)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_remquol.S

@@ -63,3 +63,7 @@ ENTRY(remquol)
 	ret
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_rint.S

@@ -14,3 +14,7 @@ ENTRY(rint)
 END(rint)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_rintf.S

@@ -15,3 +15,7 @@ ENTRY(rintf)
 END(rintf)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_rintl.S

@@ -13,3 +13,7 @@ ENTRY(rintl)
 	ret
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_scalbn.S

@@ -17,3 +17,7 @@ END(scalbn)
 
 .globl CNAME(ldexp)
 .set   CNAME(ldexp),CNAME(scalbn)
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_scalbnf.S

@@ -20,3 +20,7 @@ END(scalbnf)
 .set	CNAME(ldexpf),CNAME(scalbnf)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_scalbnl.S

@@ -20,3 +20,7 @@ END(scalbnl)
 .set	CNAME(ldexpl),CNAME(scalbnl)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_significand.S

@@ -15,3 +15,7 @@ ENTRY(significand)
 END(significand)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_significandf.S

@@ -16,3 +16,7 @@ ENTRY(significandf)
 END(significandf)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_sin.S

@@ -27,3 +27,7 @@ ENTRY(sin)
 END(sin)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_tan.S

@@ -29,3 +29,7 @@ ENTRY(tan)
 END(tan)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_trunc.S

@@ -27,3 +27,7 @@ ENTRY(trunc)
 END(trunc)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_truncf.S

@@ -27,3 +27,7 @@ ENTRY(truncf)
 END(truncf)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 4 - 0
i387/s_truncl.S

@@ -27,3 +27,7 @@ ENTRY(truncl)
 END(truncl)
 
 	
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 5 - 0
ia64/s_fma.S

@@ -33,3 +33,8 @@ ENTRY(fma, 3)
 	br.ret.sptk	b0
 }
 END(fma)
+
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 5 - 0
ia64/s_fmaf.S

@@ -33,3 +33,8 @@ ENTRY(fmaf, 3)
 	br.ret.sptk	b0
 }
 END(fmaf)
+
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 5 - 0
ia64/s_fmal.S

@@ -33,3 +33,8 @@ ENTRY(fmal, 3)
 	br.ret.sptk	b0
 }
 END(fmal)
+
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 5 - 0
sparc64/e_sqrt.S

@@ -31,3 +31,8 @@ ENTRY(sqrt)
 	retl
 	fsqrtd %f0, %f0
 END(sqrt)
+
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif

+ 5 - 0
sparc64/e_sqrtf.S

@@ -31,3 +31,8 @@ ENTRY(sqrtf)
 	retl
 	fsqrts %f1, %f0
 END(sqrtf)
+
+/* Enable stack protection */
+#if defined(__linux__) && defined(__ELF__)
+.section .note.GNU-stack,"",%progbits
+#endif