summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/microblaze/sysdep.h
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2016-05-23 03:38:00 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2016-05-24 20:39:09 +0200
commit2559592659fe8225fc7d67fa5bc83a1589819054 (patch)
treedb0d5cbc4264a75600b920db4138c09418906159 /libc/sysdeps/linux/microblaze/sysdep.h
parentb1fb0d0bf5d09bf9dbdbc320814bd087d4d26460 (diff)
microblaze: fix setjmp/longjmp
Sync mostly with GNU libc implementation of setjmp/longjmp. Just generate PIC compatible code, so no difference for static builds are made. Add sysdep.h with some handy assembly macros used inside setjmp.S/__longjmp.S. This unbreaks dynamic linker support, first test suite run only shows 10 errors, which doesn't look so bad.
Diffstat (limited to 'libc/sysdeps/linux/microblaze/sysdep.h')
-rw-r--r--libc/sysdeps/linux/microblaze/sysdep.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/microblaze/sysdep.h b/libc/sysdeps/linux/microblaze/sysdep.h
new file mode 100644
index 000000000..1f01a2a1d
--- /dev/null
+++ b/libc/sysdeps/linux/microblaze/sysdep.h
@@ -0,0 +1,25 @@
+#include <common/sysdep.h>
+
+#ifdef __ASSEMBLER__
+
+/* Syntactic details of assembler. */
+
+# define ALIGNARG(log2) log2
+# define ASM_SIZE_DIRECTIVE(name) .size name,.-name
+
+/* Define an entry point visible from C. */
+# define ENTRY(name) \
+ .globl C_SYMBOL_NAME(name); \
+ .type C_SYMBOL_NAME(name),@function; \
+ .align ALIGNARG(2); \
+ C_LABEL(name)
+
+# undef END
+# define END(name) ASM_SIZE_DIRECTIVE(name)
+
+/* Local label name for asm code. */
+# ifndef L
+# define L(name) $L##name
+# endif
+
+#endif