Kaynağa Gözat

Enable stack protection for all ELFs, not only __linux__

Graham Inggs 9 yıl önce
ebeveyn
işleme
e3336dd022
67 değiştirilmiş dosya ile 67 ekleme ve 67 silme
  1. 1 1
      amd64/bsd_asm.h
  2. 1 1
      amd64/e_remainder.S
  3. 1 1
      amd64/e_remainderf.S
  4. 1 1
      amd64/e_remainderl.S
  5. 1 1
      amd64/e_sqrt.S
  6. 1 1
      amd64/e_sqrtf.S
  7. 1 1
      amd64/e_sqrtl.S
  8. 1 1
      amd64/s_llrint.S
  9. 1 1
      amd64/s_llrintf.S
  10. 1 1
      amd64/s_llrintl.S
  11. 1 1
      amd64/s_logbl.S
  12. 1 1
      amd64/s_lrint.S
  13. 1 1
      amd64/s_lrintf.S
  14. 1 1
      amd64/s_lrintl.S
  15. 1 1
      amd64/s_remquo.S
  16. 1 1
      amd64/s_remquof.S
  17. 1 1
      amd64/s_remquol.S
  18. 1 1
      amd64/s_rintl.S
  19. 1 1
      amd64/s_scalbn.S
  20. 1 1
      amd64/s_scalbnf.S
  21. 1 1
      amd64/s_scalbnl.S
  22. 1 1
      i387/bsd_asm.h
  23. 1 1
      i387/e_exp.S
  24. 1 1
      i387/e_fmod.S
  25. 1 1
      i387/e_log.S
  26. 1 1
      i387/e_log10.S
  27. 1 1
      i387/e_log10f.S
  28. 1 1
      i387/e_logf.S
  29. 1 1
      i387/e_remainder.S
  30. 1 1
      i387/e_remainderf.S
  31. 1 1
      i387/e_remainderl.S
  32. 1 1
      i387/e_sqrt.S
  33. 1 1
      i387/e_sqrtf.S
  34. 1 1
      i387/e_sqrtl.S
  35. 1 1
      i387/s_ceil.S
  36. 1 1
      i387/s_ceilf.S
  37. 1 1
      i387/s_ceill.S
  38. 1 1
      i387/s_copysign.S
  39. 1 1
      i387/s_copysignf.S
  40. 1 1
      i387/s_copysignl.S
  41. 1 1
      i387/s_cos.S
  42. 1 1
      i387/s_floor.S
  43. 1 1
      i387/s_floorf.S
  44. 1 1
      i387/s_floorl.S
  45. 1 1
      i387/s_llrint.S
  46. 1 1
      i387/s_llrintf.S
  47. 1 1
      i387/s_llrintl.S
  48. 1 1
      i387/s_logb.S
  49. 1 1
      i387/s_logbf.S
  50. 1 1
      i387/s_logbl.S
  51. 1 1
      i387/s_lrint.S
  52. 1 1
      i387/s_lrintf.S
  53. 1 1
      i387/s_lrintl.S
  54. 1 1
      i387/s_remquo.S
  55. 1 1
      i387/s_remquof.S
  56. 1 1
      i387/s_remquol.S
  57. 1 1
      i387/s_rint.S
  58. 1 1
      i387/s_rintf.S
  59. 1 1
      i387/s_rintl.S
  60. 1 1
      i387/s_scalbn.S
  61. 1 1
      i387/s_scalbnf.S
  62. 1 1
      i387/s_scalbnl.S
  63. 1 1
      i387/s_sin.S
  64. 1 1
      i387/s_tan.S
  65. 1 1
      i387/s_trunc.S
  66. 1 1
      i387/s_truncf.S
  67. 1 1
      i387/s_truncl.S

+ 1 - 1
amd64/bsd_asm.h

@@ -62,7 +62,7 @@
 
 #define _START_ENTRY	.p2align 4,0x90
 
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__ELF__)
+#if defined(__ELF__)
 #define _ENTRY(x)	.text; _START_ENTRY; \
 			.globl CNAME(x); .type CNAME(x),@function; CNAME(x):
 #define	END(x)		.size x, . - x

+ 1 - 1
amd64/e_remainder.S

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

+ 1 - 1
amd64/e_remainderf.S

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

+ 1 - 1
amd64/e_remainderl.S

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

+ 1 - 1
amd64/e_sqrt.S

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

+ 1 - 1
amd64/e_sqrtf.S

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

+ 1 - 1
amd64/e_sqrtl.S

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

+ 1 - 1
amd64/s_llrint.S

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

+ 1 - 1
amd64/s_llrintf.S

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

+ 1 - 1
amd64/s_llrintl.S

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

+ 1 - 1
amd64/s_logbl.S

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

+ 1 - 1
amd64/s_lrint.S

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

+ 1 - 1
amd64/s_lrintf.S

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

+ 1 - 1
amd64/s_lrintl.S

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

+ 1 - 1
amd64/s_remquo.S

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

+ 1 - 1
amd64/s_remquof.S

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

+ 1 - 1
amd64/s_remquol.S

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

+ 1 - 1
amd64/s_rintl.S

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

+ 1 - 1
amd64/s_scalbn.S

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

+ 1 - 1
amd64/s_scalbnf.S

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

+ 1 - 1
amd64/s_scalbnl.S

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

+ 1 - 1
i387/bsd_asm.h

@@ -72,7 +72,7 @@
 /* XXX should use .p2align 4,0x90 for -m486. */
 #define _START_ENTRY .p2align 2,0x90
 
-#if defined(__linux__) || defined(__FreeBSD__) || defined(__ELF__)
+#if defined(__ELF__)
 #define CNAME(csym)		csym
 #define HIDENAME(asmsym)	.asmsym
 #define _ENTRY(x) .text; _START_ENTRY; \

+ 1 - 1
i387/e_exp.S

@@ -71,6 +71,6 @@ END(exp)
     //
 
 /* Enable stack protection */
-#if defined(__linux__) && defined(__ELF__)
+#if defined(__ELF__)
 .section .note.GNU-stack,"",%progbits
 #endif

+ 1 - 1
i387/e_fmod.S

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

+ 1 - 1
i387/e_log.S

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

+ 1 - 1
i387/e_log10.S

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

+ 1 - 1
i387/e_log10f.S

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

+ 1 - 1
i387/e_logf.S

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

+ 1 - 1
i387/e_remainder.S

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

+ 1 - 1
i387/e_remainderf.S

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

+ 1 - 1
i387/e_remainderl.S

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

+ 1 - 1
i387/e_sqrt.S

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

+ 1 - 1
i387/e_sqrtf.S

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

+ 1 - 1
i387/e_sqrtl.S

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

+ 1 - 1
i387/s_ceil.S

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

+ 1 - 1
i387/s_ceilf.S

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

+ 1 - 1
i387/s_ceill.S

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

+ 1 - 1
i387/s_copysign.S

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

+ 1 - 1
i387/s_copysignf.S

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

+ 1 - 1
i387/s_copysignl.S

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

+ 1 - 1
i387/s_cos.S

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

+ 1 - 1
i387/s_floor.S

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

+ 1 - 1
i387/s_floorf.S

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

+ 1 - 1
i387/s_floorl.S

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

+ 1 - 1
i387/s_llrint.S

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

+ 1 - 1
i387/s_llrintf.S

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

+ 1 - 1
i387/s_llrintl.S

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

+ 1 - 1
i387/s_logb.S

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

+ 1 - 1
i387/s_logbf.S

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

+ 1 - 1
i387/s_logbl.S

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

+ 1 - 1
i387/s_lrint.S

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

+ 1 - 1
i387/s_lrintf.S

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

+ 1 - 1
i387/s_lrintl.S

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

+ 1 - 1
i387/s_remquo.S

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

+ 1 - 1
i387/s_remquof.S

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

+ 1 - 1
i387/s_remquol.S

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

+ 1 - 1
i387/s_rint.S

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

+ 1 - 1
i387/s_rintf.S

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

+ 1 - 1
i387/s_rintl.S

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

+ 1 - 1
i387/s_scalbn.S

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

+ 1 - 1
i387/s_scalbnf.S

@@ -21,6 +21,6 @@ END(scalbnf)
 
 	
 /* Enable stack protection */
-#if defined(__linux__) && defined(__ELF__)
+#if defined(__ELF__)
 .section .note.GNU-stack,"",%progbits
 #endif

+ 1 - 1
i387/s_scalbnl.S

@@ -21,6 +21,6 @@ END(scalbnl)
 
 	
 /* Enable stack protection */
-#if defined(__linux__) && defined(__ELF__)
+#if defined(__ELF__)
 .section .note.GNU-stack,"",%progbits
 #endif

+ 1 - 1
i387/s_sin.S

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

+ 1 - 1
i387/s_tan.S

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

+ 1 - 1
i387/s_trunc.S

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

+ 1 - 1
i387/s_truncf.S

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

+ 1 - 1
i387/s_truncl.S

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