Annotate arm userspace assembler sources stating their tolerance to

the non-executable stack.

Reviewed by:	andrew
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Konstantin Belousov 2015-09-29 16:09:58 +00:00
parent 3e10dd1049
commit 96cdb0ab9d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=288373
41 changed files with 74 additions and 2 deletions

View File

@ -18,3 +18,5 @@ END_COMPILERRT_FUNCTION(__aeabi_memcmp)
DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memcmp4, __aeabi_memcmp)
DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memcmp8, __aeabi_memcmp)
.section .note.GNU-stack,"",%progbits

View File

@ -18,3 +18,5 @@ END_COMPILERRT_FUNCTION(__aeabi_memcpy)
DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memcpy4, __aeabi_memcpy)
DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memcpy8, __aeabi_memcpy)
.section .note.GNU-stack,"",%progbits

View File

@ -18,3 +18,5 @@ END_COMPILERRT_FUNCTION(__aeabi_memmove)
DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memmove4, __aeabi_memmove)
DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memmove8, __aeabi_memmove)
.section .note.GNU-stack,"",%progbits

View File

@ -32,3 +32,4 @@ END_COMPILERRT_FUNCTION(__aeabi_memclr)
DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memclr4, __aeabi_memclr)
DEFINE_AEABI_FUNCTION_ALIAS(__aeabi_memclr8, __aeabi_memclr)
.section .note.GNU-stack,"",%progbits

View File

@ -60,6 +60,8 @@
.file "crti.asm"
.section .note.GNU-stack,"",%progbits
.section ".init"
.align 2
.global _init

View File

@ -68,6 +68,8 @@
.file "crtn.asm"
.section .note.GNU-stack,"",%progbits
.section ".init"
;;
FUNC_END

View File

@ -1305,3 +1305,5 @@ LSYM(Lchange_\register):
#include "ieee754-sf.S"
#include "bpabi.S"
#endif /* __symbian__ */
.section .note.GNU-stack,"",%progbits

View File

@ -19,3 +19,4 @@ _fini:
stmdb sp!, {fp, ip, lr, pc}
sub fp, ip, #4
.section .note.GNU-stack,"",%progbits

View File

@ -8,3 +8,5 @@ __FBSDID("$FreeBSD$");
.section .fini,"ax",%progbits
ldmea fp, {fp, sp, pc}
mov pc, lr
.section .note.GNU-stack,"",%progbits

View File

@ -117,3 +117,5 @@ ENTRY(__aeabi_cdcmpeq)
msr cpsr_c, ip
RET
END(__aeabi_cdcmpeq)
.section .note.GNU-stack,"",%progbits

View File

@ -108,3 +108,5 @@ ENTRY(__aeabi_cfcmpeq)
msr cpsr_c, ip
RET
END(__aeabi_cfcmpeq)
.section .note.GNU-stack,"",%progbits

View File

@ -201,3 +201,4 @@ AEABI_ENTRY(dsub)
RET
AEABI_END(dsub)
.section .note.GNU-stack,"",%progbits

View File

@ -188,3 +188,4 @@ AEABI_ENTRY(fsub)
RET
AEABI_END(fsub)
.section .note.GNU-stack,"",%progbits

View File

@ -45,3 +45,4 @@ END(__aeabi_read_tp)
.word ARM_TP_ADDRESS
#endif
.section .note.GNU-stack,"",%progbits

View File

@ -8,3 +8,5 @@ ENTRY(_ctx_start)
bl _C_LABEL(ctx_done)
bl _C_LABEL(abort)
END(_ctx_start)
.section .note.GNU-stack,"",%progbits

View File

@ -157,3 +157,5 @@ botch:
b .
#endif
END(_longjmp)
.section .note.GNU-stack,"",%progbits

View File

@ -44,3 +44,5 @@ ENTRY(alloca)
mov r0, sp /* r0 = base of new space */
RET
END(alloca)
.section .note.GNU-stack,"",%progbits

View File

@ -389,3 +389,5 @@ ENTRY(__divsi3)
mov r0, r3
RET
END(__divsi3)
.section .note.GNU-stack,"",%progbits

View File

@ -158,3 +158,5 @@ ENTRY(__longjmp)
bl PIC_SYM(_C_LABEL(abort), PLT)
1: b 1b /* Cannot get here */
END(__longjmp)
.section .note.GNU-stack,"",%progbits

View File

@ -66,3 +66,5 @@ ENTRY(siglongjmp)
beq PIC_SYM(_C_LABEL(_longjmp), PLT)
b PIC_SYM(_C_LABEL(longjmp), PLT)
END(siglongjmp)
.section .note.GNU-stack,"",%progbits

View File

@ -84,3 +84,5 @@ ENTRY(ffs)
RET
#endif
END(ffs)
.section .note.GNU-stack,"",%progbits

View File

@ -181,3 +181,5 @@ ENTRY(memcmp)
RET
#endif
END(memcmp)
.section .note.GNU-stack,"",%progbits

View File

@ -334,3 +334,5 @@ ENTRY(memcpy)
sub r1, r1, #1
b .Lmemcpy_l4
END(memcpy)
.section .note.GNU-stack,"",%progbits

View File

@ -1784,3 +1784,5 @@ ENTRY(memcpy)
bx lr
#endif /* !_STANDALONE */
END(memcpy)
.section .note.GNU-stack,"",%progbits

View File

@ -609,3 +609,5 @@ END(memmove)
#else
END(bcopy)
#endif
.section .note.GNU-stack,"",%progbits

View File

@ -263,3 +263,5 @@ END(bzero)
#else
END(memset)
#endif
.section .note.GNU-stack,"",%progbits

View File

@ -43,3 +43,5 @@ ENTRY(strcmp)
sub r0, r2, r3
RET
END(strcmp)
.section .note.GNU-stack,"",%progbits

View File

@ -83,3 +83,5 @@ ENTRY(strlen)
mov r0, r1
RET
END(strlen)
.section .note.GNU-stack,"",%progbits

View File

@ -56,3 +56,5 @@ ENTRY(strncmp)
sub r0, r2, r3
RET
END(strncmp)
.section .note.GNU-stack,"",%progbits

View File

@ -53,3 +53,5 @@ ENTRY(vfork)
and r0, r0, r1 /* r0 == 0 if child, else unchanged */
mov r15, r2
END(vfork)
.section .note.GNU-stack,"",%progbits

View File

@ -91,3 +91,5 @@ ENTRY(_brk)
.Lcurbrk:
.word PIC_SYM(CURBRK, GOT)
END(_brk)
.section .note.GNU-stack,"",%progbits

View File

@ -47,3 +47,5 @@ ASENTRY(CERROR)
mvn r1, #0x00000000
ldmfd sp!, {r4, pc}
END(CERROR)
.section .note.GNU-stack,"",%progbits

View File

@ -49,3 +49,5 @@ ENTRY(_pipe)
mov r0, #0x00000000
RET
END(_pipe)
.section .note.GNU-stack,"",%progbits

View File

@ -47,3 +47,5 @@ ENTRY(ptrace)
bcs PIC_SYM(CERROR, PLT)
RET
END(ptrace)
.section .note.GNU-stack,"",%progbits

View File

@ -78,3 +78,5 @@ ENTRY(_sbrk)
.Lcurbrk:
.word PIC_SYM(CURBRK, GOT)
END(_sbrk)
.section .note.GNU-stack,"",%progbits

View File

@ -5,3 +5,5 @@ __FBSDID("$FreeBSD$");
#include "SYS.h"
RSYSCALL(shmat)
.section .note.GNU-stack,"",%progbits

View File

@ -40,3 +40,5 @@ __FBSDID("$FreeBSD$");
*/
RSYSCALL(sigreturn)
.section .note.GNU-stack,"",%progbits

View File

@ -36,3 +36,5 @@ __FBSDID("$FreeBSD$");
#include "SYS.h"
RSYSCALL(syscall)
.section .note.GNU-stack,"",%progbits

View File

@ -102,7 +102,7 @@ SYM_MAPS+= ${LIBC_SRCTOP}/sys/Symbol.map
CLEANFILES+= ${SASM} ${SPSEUDO}
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \
${MACHINE_CPUARCH} == "powerpc"
${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_ARCH:Marmv6*}
NOTE_GNU_STACK='\t.section .note.GNU-stack,"",%%progbits\n'
.else
NOTE_GNU_STACK=''

View File

@ -230,7 +230,7 @@ SYMLINKS+=libcompiler_rt_p.a ${LIBDIR}/libgcc_p.a
.endif
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \
${MACHINE_CPUARCH} == "powerpc"
${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_ARCH:Marmv6*}
AFLAGS+=--noexecstack
ACFLAGS+=-Wa,--noexecstack
.endif

View File

@ -97,3 +97,4 @@ _rtld_bind_start:
ldmia sp!,{r0-r5,sl,fp,lr} /* restore the stack */
mov pc, ip /* jump to the new address */
.section .note.GNU-stack,"",%progbits