summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarmelo Amoroso <carmelo.amoroso@st.com>2008-09-18 15:16:30 +0000
committerCarmelo Amoroso <carmelo.amoroso@st.com>2008-09-18 15:16:30 +0000
commit4d5e60d5a4fce9be60a6a1477bc3fe07fa689bf6 (patch)
tree810e694de4ba29ad78971dac0f107aab5575bf59
parent0f8269c12af221c163ed28b0388242506d3aee8a (diff)
downloaduClibc-alpine-4d5e60d5a4fce9be60a6a1477bc3fe07fa689bf6.tar.bz2
uClibc-alpine-4d5e60d5a4fce9be60a6a1477bc3fe07fa689bf6.tar.xz
sh_nptl: Enable CFI directives for sh
Enable CFI directives for sh to add proper CFI information into assembly functions. This provides stack frame information used during stack unwinding as well by debugger for backtracing. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
-rw-r--r--include/libc-symbols.h6
-rw-r--r--libc/sysdeps/linux/sh/bits/uClibc_arch_features.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index e491aff5f..098a837cf 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -112,6 +112,12 @@
# undef HAVE_ASM_GLOBAL_DOT_NAME
#endif
+#ifdef __UCLIBC_HAVE_ASM_CFI_DIRECTIVES__
+# define HAVE_ASM_CFI_DIRECTIVES
+#else
+# undef HAVE_ASM_CFI_DIRECTIVES
+#endif
+
#if defined HAVE_ASM_WEAK_DIRECTIVE || defined HAVE_ASM_WEAKEXT_DIRECTIVE
# define HAVE_WEAK_SYMBOLS
#endif
diff --git a/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h b/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h
index 55e34804f..4d0845351 100644
--- a/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/sh/bits/uClibc_arch_features.h
@@ -39,6 +39,9 @@
/* needed probably only for ppc64 */
#undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
+/* define if target supports CFI pseudo ops */
+#define __UCLIBC_HAVE_ASM_CFI_DIRECTIVES__
+
/* define if target supports IEEE signed zero floats */
#define __UCLIBC_HAVE_SIGNED_ZERO__