summaryrefslogtreecommitdiff
path: root/gcc/unwind.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/unwind.h')
-rw-r--r--gcc/unwind.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/unwind.h b/gcc/unwind.h
index 8df0930e917..ce43365a314 100644
--- a/gcc/unwind.h
+++ b/gcc/unwind.h
@@ -161,6 +161,31 @@ extern _Unwind_Reason_Code _Unwind_SjLj_ForcedUnwind
(struct _Unwind_Exception *, _Unwind_Stop_Fn, void *);
extern void _Unwind_SjLj_Resume (struct _Unwind_Exception *);
+/* @@@ The following provide access to the base addresses for text
+ and data-relative addressing in the LDSA. In order to stay link
+ compatible with the standard ABI for IA-64, we inline these. */
+
+#ifdef __ia64__
+#include <stdlib.h>
+
+static inline _Unwind_Ptr
+_Unwind_GetDataRelBase (struct _Unwind_Context *_C)
+{
+ /* The GP is stored in R1. */
+ return _Unwind_GetGR (_C, 1);
+}
+
+static inline _Unwind_Ptr
+_Unwind_GetTextRelBase (struct _Unwind_Context *_C)
+{
+ abort ();
+ return 0;
+}
+#else
+extern _Unwind_Ptr _Unwind_GetDataRelBase (struct _Unwind_Context *);
+extern _Unwind_Ptr _Unwind_GetTextRelBase (struct _Unwind_Context *);
+#endif
+
#ifdef __cplusplus
}
#endif