From 8f861da99cb9865b2f1ef6098ad074150f368c23 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Fri, 14 Jan 2011 11:33:40 +0000 Subject: [PATCH] Mark assembler sources from libc as working with non-executable stack. Reviewed and tested by: nwhitehorn --- lib/libc/powerpc/gen/_ctx_start.S | 2 ++ lib/libc/powerpc/gen/_setjmp.S | 2 ++ lib/libc/powerpc/gen/fabs.S | 2 ++ lib/libc/powerpc/gen/setjmp.S | 1 + lib/libc/powerpc/gen/sigsetjmp.S | 2 ++ lib/libc/powerpc/sys/brk.S | 2 ++ lib/libc/powerpc/sys/cerror.S | 2 +- lib/libc/powerpc/sys/exect.S | 2 ++ lib/libc/powerpc/sys/pipe.S | 2 ++ lib/libc/powerpc/sys/ptrace.S | 2 ++ lib/libc/powerpc/sys/sbrk.S | 2 ++ lib/libc/powerpc/sys/setlogin.S | 2 ++ lib/libc/powerpc64/gen/_ctx_start.S | 2 ++ lib/libc/powerpc64/gen/_setjmp.S | 2 ++ lib/libc/powerpc64/gen/fabs.S | 2 ++ lib/libc/powerpc64/gen/setjmp.S | 1 + lib/libc/powerpc64/gen/sigsetjmp.S | 2 ++ lib/libc/powerpc64/sys/brk.S | 2 ++ lib/libc/powerpc64/sys/cerror.S | 2 +- lib/libc/powerpc64/sys/exect.S | 2 ++ lib/libc/powerpc64/sys/pipe.S | 2 ++ lib/libc/powerpc64/sys/ptrace.S | 2 ++ lib/libc/powerpc64/sys/sbrk.S | 2 ++ lib/libc/powerpc64/sys/setlogin.S | 2 ++ 24 files changed, 44 insertions(+), 2 deletions(-) diff --git a/lib/libc/powerpc/gen/_ctx_start.S b/lib/libc/powerpc/gen/_ctx_start.S index a269e86eefc1..2d3cfcfcf1ef 100644 --- a/lib/libc/powerpc/gen/_ctx_start.S +++ b/lib/libc/powerpc/gen/_ctx_start.S @@ -41,3 +41,5 @@ * above branch. */ bl PIC_PLT(CNAME(abort)) /* abort */ + + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc/gen/_setjmp.S b/lib/libc/powerpc/gen/_setjmp.S index 6d6e5e062a6f..9b9f86edb840 100644 --- a/lib/libc/powerpc/gen/_setjmp.S +++ b/lib/libc/powerpc/gen/_setjmp.S @@ -69,3 +69,5 @@ ENTRY(_longjmp) bnelr li %r3,1 blr + + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc/gen/fabs.S b/lib/libc/powerpc/gen/fabs.S index 79475ca9c0a8..7891012e281c 100644 --- a/lib/libc/powerpc/gen/fabs.S +++ b/lib/libc/powerpc/gen/fabs.S @@ -33,3 +33,5 @@ __FBSDID("$FreeBSD$"); ENTRY(fabs) fabs %f1,%f1 blr + + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc/gen/setjmp.S b/lib/libc/powerpc/gen/setjmp.S index a7961206f6cb..6aaf81c7832d 100644 --- a/lib/libc/powerpc/gen/setjmp.S +++ b/lib/libc/powerpc/gen/setjmp.S @@ -89,3 +89,4 @@ ENTRY(__longjmp) li %r3,1 blr + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc/gen/sigsetjmp.S b/lib/libc/powerpc/gen/sigsetjmp.S index 3d5d1e510e54..5a6fd2141e77 100644 --- a/lib/libc/powerpc/gen/sigsetjmp.S +++ b/lib/libc/powerpc/gen/sigsetjmp.S @@ -95,3 +95,5 @@ ENTRY(siglongjmp) bnelr li %r3,1 blr + + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc/sys/brk.S b/lib/libc/powerpc/sys/brk.S index 9223db3d680b..018eec9ebf53 100644 --- a/lib/libc/powerpc/sys/brk.S +++ b/lib/libc/powerpc/sys/brk.S @@ -71,3 +71,5 @@ ENTRY(brk) 1: b PIC_PLT(HIDENAME(cerror)) + + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc/sys/cerror.S b/lib/libc/powerpc/sys/cerror.S index 91a30062b893..7667cb8361d3 100644 --- a/lib/libc/powerpc/sys/cerror.S +++ b/lib/libc/powerpc/sys/cerror.S @@ -54,4 +54,4 @@ HIDENAME(cerror): li %r4,-1 blr /* return to callers caller */ - + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc/sys/exect.S b/lib/libc/powerpc/sys/exect.S index d5f9c201b676..3c39b3c47e6b 100644 --- a/lib/libc/powerpc/sys/exect.S +++ b/lib/libc/powerpc/sys/exect.S @@ -37,3 +37,5 @@ ENTRY(exect) blr 1: b PIC_PLT(HIDENAME(cerror)) + + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc/sys/pipe.S b/lib/libc/powerpc/sys/pipe.S index 3ca2358321e2..3f6d9a474353 100644 --- a/lib/libc/powerpc/sys/pipe.S +++ b/lib/libc/powerpc/sys/pipe.S @@ -41,3 +41,5 @@ ENTRY(pipe) blr /* and return 0 */ 1: b PIC_PLT(HIDENAME(cerror)) + + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc/sys/ptrace.S b/lib/libc/powerpc/sys/ptrace.S index f47fc67c70e9..0bc25c91fa78 100644 --- a/lib/libc/powerpc/sys/ptrace.S +++ b/lib/libc/powerpc/sys/ptrace.S @@ -56,3 +56,5 @@ ENTRY(ptrace) blr 1: b PIC_PLT(HIDENAME(cerror)) + + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc/sys/sbrk.S b/lib/libc/powerpc/sys/sbrk.S index 47fc0fe62028..a5e402001334 100644 --- a/lib/libc/powerpc/sys/sbrk.S +++ b/lib/libc/powerpc/sys/sbrk.S @@ -68,3 +68,5 @@ ENTRY(sbrk) blr 2: b PIC_PLT(HIDENAME(cerror)) + + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc/sys/setlogin.S b/lib/libc/powerpc/sys/setlogin.S index c65e639ba55f..e0d6d3c012ce 100644 --- a/lib/libc/powerpc/sys/setlogin.S +++ b/lib/libc/powerpc/sys/setlogin.S @@ -47,3 +47,5 @@ SYSCALL(setlogin) stw %r5,CNAME(_logname_valid)@l(%r4) #endif blr + + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc64/gen/_ctx_start.S b/lib/libc/powerpc64/gen/_ctx_start.S index 4dabd13e6bb5..6e373c88be6c 100644 --- a/lib/libc/powerpc64/gen/_ctx_start.S +++ b/lib/libc/powerpc64/gen/_ctx_start.S @@ -45,3 +45,5 @@ */ nop bl PIC_PLT(CNAME(abort)) /* abort */ + + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc64/gen/_setjmp.S b/lib/libc/powerpc64/gen/_setjmp.S index e7ea5f7bae67..a5c247dd81fa 100644 --- a/lib/libc/powerpc64/gen/_setjmp.S +++ b/lib/libc/powerpc64/gen/_setjmp.S @@ -114,3 +114,5 @@ ENTRY(_longjmp) bnelr li %r3,1 blr + + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc64/gen/fabs.S b/lib/libc/powerpc64/gen/fabs.S index 79475ca9c0a8..7891012e281c 100644 --- a/lib/libc/powerpc64/gen/fabs.S +++ b/lib/libc/powerpc64/gen/fabs.S @@ -33,3 +33,5 @@ __FBSDID("$FreeBSD$"); ENTRY(fabs) fabs %f1,%f1 blr + + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc64/gen/setjmp.S b/lib/libc/powerpc64/gen/setjmp.S index fff8aeead794..0f33ab2ebb00 100644 --- a/lib/libc/powerpc64/gen/setjmp.S +++ b/lib/libc/powerpc64/gen/setjmp.S @@ -137,3 +137,4 @@ ENTRY(__longjmp) li %r3,1 blr + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc64/gen/sigsetjmp.S b/lib/libc/powerpc64/gen/sigsetjmp.S index 9a26a8f6237c..7b50f9fd7d2c 100644 --- a/lib/libc/powerpc64/gen/sigsetjmp.S +++ b/lib/libc/powerpc64/gen/sigsetjmp.S @@ -142,3 +142,5 @@ ENTRY(siglongjmp) bnelr li %r3,1 blr + + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc64/sys/brk.S b/lib/libc/powerpc64/sys/brk.S index 59b891c3f768..1e71663a75e6 100644 --- a/lib/libc/powerpc64/sys/brk.S +++ b/lib/libc/powerpc64/sys/brk.S @@ -69,3 +69,5 @@ ENTRY(brk) ld %r0,16(%r1) mtlr %r0 blr + + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc64/sys/cerror.S b/lib/libc/powerpc64/sys/cerror.S index 9afb0f458723..db7a10fbf52a 100644 --- a/lib/libc/powerpc64/sys/cerror.S +++ b/lib/libc/powerpc64/sys/cerror.S @@ -57,4 +57,4 @@ ENTRY(HIDENAME(cerror)) li %r4,-1 blr - + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc64/sys/exect.S b/lib/libc/powerpc64/sys/exect.S index eecbd11f0131..b752fb8d97b8 100644 --- a/lib/libc/powerpc64/sys/exect.S +++ b/lib/libc/powerpc64/sys/exect.S @@ -45,3 +45,5 @@ ENTRY(exect) ld %r0,16(%r1) mtlr %r0 blr + + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc64/sys/pipe.S b/lib/libc/powerpc64/sys/pipe.S index fe115b0b23ae..0a92df57dd77 100644 --- a/lib/libc/powerpc64/sys/pipe.S +++ b/lib/libc/powerpc64/sys/pipe.S @@ -49,3 +49,5 @@ ENTRY(pipe) ld %r0,16(%r1) mtlr %r0 blr + + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc64/sys/ptrace.S b/lib/libc/powerpc64/sys/ptrace.S index 3ec4915a75d1..bda17e8b0b4a 100644 --- a/lib/libc/powerpc64/sys/ptrace.S +++ b/lib/libc/powerpc64/sys/ptrace.S @@ -63,3 +63,5 @@ ENTRY(ptrace) ld %r0,16(%r1) mtlr %r0 blr + + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc64/sys/sbrk.S b/lib/libc/powerpc64/sys/sbrk.S index a7a9c7705bb2..c7670497d6db 100644 --- a/lib/libc/powerpc64/sys/sbrk.S +++ b/lib/libc/powerpc64/sys/sbrk.S @@ -64,3 +64,5 @@ ENTRY(sbrk) ld %r0,16(%r1) mtlr %r0 blr + + .section .note.GNU-stack,"",%progbits diff --git a/lib/libc/powerpc64/sys/setlogin.S b/lib/libc/powerpc64/sys/setlogin.S index 19e32123d4cd..6183407b3fe7 100644 --- a/lib/libc/powerpc64/sys/setlogin.S +++ b/lib/libc/powerpc64/sys/setlogin.S @@ -37,3 +37,5 @@ SYSCALL(setlogin) li %r5,0 stw %r5,CNAME(_logname_valid)@toc@l(%r4) blr + + .section .note.GNU-stack,"",%progbits