[prev in list] [next in list] [prev in thread] [next in thread]
List: uclibc
Subject: [PATCH v2] ARC/signal: shield sa_restorer from compiler toggle side-effects
From: Vineet Gupta <Vineet.Gupta1 () synopsys ! com>
Date: 2015-03-26 12:49:04
Message-ID: 1427373424-13935-1-git-send-email-vgupta () synopsys ! com
[Download RAW message or body]
when building uClibc with -O0 (DODEBUG build) the default sigrestorer
had some extra glue code generated for stack manipulation which was
messing up resume from signal path.
So annotate the function with -Os so that gcc would only generate the
bare min 2 instruction TRAP sequence
Reported-and-Debugged-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
---
libc/sysdeps/linux/arc/sigaction.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libc/sysdeps/linux/arc/sigaction.c b/libc/sysdeps/linux/arc/sigaction.c
index 4a4c9e2d0821..67ca38acacca 100644
--- a/libc/sysdeps/linux/arc/sigaction.c
+++ b/libc/sysdeps/linux/arc/sigaction.c
@@ -13,7 +13,8 @@
/*
* Default sigretrun stub if user doesn't specify SA_RESTORER
*/
-static void __default_rt_sa_restorer(void)
+static void attribute_optimize("Os") __attribute_noinline__
+__default_rt_sa_restorer(void)
{
INTERNAL_SYSCALL_NCS(__NR_rt_sigreturn, , 0);
}
--
1.9.1
_______________________________________________
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic