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
This commit is contained in:
Milan Bouchet-Valat 2013-12-21 21:18:57 +01:00
parent 9ca11f20c6
commit 0affa5be19
73 changed files with 298 additions and 0 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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

View File

@ -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

View File

@ -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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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

View File

@ -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

View File

@ -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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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