Enable stack protection for all ELFs, not only __linux__

This commit is contained in:
Graham Inggs
2015-11-07 11:28:48 +02:00
parent ebe1db3ce4
commit e3336dd022
67 changed files with 67 additions and 67 deletions
+1 -1
View File
@@ -62,7 +62,7 @@
#define _START_ENTRY .p2align 4,0x90 #define _START_ENTRY .p2align 4,0x90
#if defined(__linux__) || defined(__FreeBSD__) || defined(__ELF__) #if defined(__ELF__)
#define _ENTRY(x) .text; _START_ENTRY; \ #define _ENTRY(x) .text; _START_ENTRY; \
.globl CNAME(x); .type CNAME(x),@function; CNAME(x): .globl CNAME(x); .type CNAME(x),@function; CNAME(x):
#define END(x) .size x, . - x #define END(x) .size x, . - x
+1 -1
View File
@@ -25,6 +25,6 @@ ENTRY(remainder)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -24,6 +24,6 @@ ENTRY(remainderf)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -30,6 +30,6 @@ ENTRY(remainderl)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -35,6 +35,6 @@ END(sqrt)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -34,6 +34,6 @@ END(sqrtf)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -41,6 +41,6 @@ ENTRY(sqrtl)
ret ret
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -7,6 +7,6 @@ ENTRY(llrint)
END(llrint) END(llrint)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -7,6 +7,6 @@ ENTRY(llrintf)
END(llrintf) END(llrintf)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -40,6 +40,6 @@ ENTRY(llrintl)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -24,6 +24,6 @@ ENTRY(logbl)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -39,6 +39,6 @@ END(lrint)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -39,6 +39,6 @@ END(lrintf)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -40,6 +40,6 @@ ENTRY(lrintl)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -71,6 +71,6 @@ END(remquo)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -71,6 +71,6 @@ END(remquof)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -76,6 +76,6 @@ ENTRY(remquol)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -21,6 +21,6 @@ ENTRY(rintl)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -50,6 +50,6 @@ END(scalbn)
.set CNAME(ldexp),CNAME(scalbn) .set CNAME(ldexp),CNAME(scalbn)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -50,6 +50,6 @@ END(scalbnf)
.set CNAME(ldexpf),CNAME(scalbnf) .set CNAME(ldexpf),CNAME(scalbnf)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -35,6 +35,6 @@ END(scalbnl)
.set CNAME(ldexpl),CNAME(scalbnl) .set CNAME(ldexpl),CNAME(scalbnl)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -72,7 +72,7 @@
/* XXX should use .p2align 4,0x90 for -m486. */ /* XXX should use .p2align 4,0x90 for -m486. */
#define _START_ENTRY .p2align 2,0x90 #define _START_ENTRY .p2align 2,0x90
#if defined(__linux__) || defined(__FreeBSD__) || defined(__ELF__) #if defined(__ELF__)
#define CNAME(csym) csym #define CNAME(csym) csym
#define HIDENAME(asmsym) .asmsym #define HIDENAME(asmsym) .asmsym
#define _ENTRY(x) .text; _START_ENTRY; \ #define _ENTRY(x) .text; _START_ENTRY; \
+1 -1
View File
@@ -71,6 +71,6 @@ END(exp)
// //
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -20,6 +20,6 @@ END(fmod)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -16,6 +16,6 @@ END(log)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -16,6 +16,6 @@ END(log10)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -17,6 +17,6 @@ END(log10f)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -16,6 +16,6 @@ ENTRY(logf)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -20,6 +20,6 @@ END(remainder)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -21,6 +21,6 @@ END(remainderf)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -20,6 +20,6 @@ ENTRY(remainderl)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -15,6 +15,6 @@ END(sqrt)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -16,6 +16,6 @@ END(sqrtf)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -14,6 +14,6 @@ ENTRY(sqrtl)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -29,6 +29,6 @@ END(ceil)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -31,6 +31,6 @@ END(ceilf)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -29,6 +29,6 @@ END(ceill)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -20,6 +20,6 @@ END(copysign)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -21,6 +21,6 @@ END(copysignf)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -19,6 +19,6 @@ END(copysignl)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -28,6 +28,6 @@ END(cos)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -30,6 +30,6 @@ END(floor)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -31,6 +31,6 @@ END(floorf)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -29,6 +29,6 @@ END(floorl)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -38,6 +38,6 @@ END(llrint)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -38,6 +38,6 @@ END(llrintf)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -37,6 +37,6 @@ ENTRY(llrintl)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -16,6 +16,6 @@ END(logb)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -17,6 +17,6 @@ END(logbf)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -15,6 +15,6 @@ ENTRY(logbl)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -37,6 +37,6 @@ END(lrint)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -37,6 +37,6 @@ END(lrintf)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -36,6 +36,6 @@ ENTRY(lrintl)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -64,6 +64,6 @@ END(remquo)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -64,6 +64,6 @@ END(remquof)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -64,6 +64,6 @@ ENTRY(remquol)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -15,6 +15,6 @@ END(rint)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -16,6 +16,6 @@ END(rintf)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -14,6 +14,6 @@ ENTRY(rintl)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -18,6 +18,6 @@ END(scalbn)
.globl CNAME(ldexp) .globl CNAME(ldexp)
.set CNAME(ldexp),CNAME(scalbn) .set CNAME(ldexp),CNAME(scalbn)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -21,6 +21,6 @@ END(scalbnf)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -21,6 +21,6 @@ END(scalbnl)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -28,6 +28,6 @@ END(sin)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -30,6 +30,6 @@ END(tan)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -28,6 +28,6 @@ END(trunc)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -28,6 +28,6 @@ END(truncf)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif
+1 -1
View File
@@ -28,6 +28,6 @@ END(truncl)
/* Enable stack protection */ /* Enable stack protection */
#if defined(__linux__) && defined(__ELF__) #if defined(__ELF__)
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif