summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-10-11 08:29:22 +0000
committerEric Andersen <andersen@codepoet.org>2001-10-11 08:29:22 +0000
commit5c12c8eecd5f2e06c200651e90befe85efcf166f (patch)
treedbaed54145d28357e3b145ad8631529ffd0c2344 /include
parenta924265e43cf2fcad97fc9489da482a27b0faf93 (diff)
Patch from Miles Bader <miles@lsi.nec.co.jp> to support the v850.
He sent this patch to me a month ago, but I forgot to apply it...
Diffstat (limited to 'include')
-rw-r--r--include/elf.h35
-rw-r--r--include/features.h14
2 files changed, 44 insertions, 5 deletions
diff --git a/include/elf.h b/include/elf.h
index da82d591f..b059583be 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -2093,6 +2093,41 @@ typedef Elf32_Addr Elf32_Conflict;
#define R_CRIS_NUM 20
+/* v850 relocations. */
+#define R_V850_NONE 0
+#define R_V850_9_PCREL 1
+#define R_V850_22_PCREL 2
+#define R_V850_HI16_S 3
+#define R_V850_HI16 4
+#define R_V850_LO16 5
+#define R_V850_32 6
+#define R_V850_16 7
+#define R_V850_8 8
+#define R_V850_SDA_16_16_OFFSET 9 /* For ld.b, st.b, set1, clr1,
+ not1, tst1, movea, movhi */
+#define R_V850_SDA_15_16_OFFSET 10 /* For ld.w, ld.h, ld.hu, st.w, st.h */
+#define R_V850_ZDA_16_16_OFFSET 11 /* For ld.b, st.b, set1, clr1,
+ not1, tst1, movea, movhi */
+#define R_V850_ZDA_15_16_OFFSET 12 /* For ld.w, ld.h, ld.hu, st.w, st.h */
+#define R_V850_TDA_6_8_OFFSET 13 /* For sst.w, sld.w */
+#define R_V850_TDA_7_8_OFFSET 14 /* For sst.h, sld.h */
+#define R_V850_TDA_7_7_OFFSET 15 /* For sst.b, sld.b */
+#define R_V850_TDA_16_16_OFFSET 16 /* For set1, clr1, not1, tst1,
+ movea, movhi */
+/* CYGNUS LOCAL v850e */
+#define R_V850_TDA_4_5_OFFSET 17 /* For sld.hu */
+#define R_V850_TDA_4_4_OFFSET 18 /* For sld.bu */
+#define R_V850_SDA_16_16_SPLIT_OFFSET 19 /* For ld.bu */
+#define R_V850_ZDA_16_16_SPLIT_OFFSET 20 /* For ld.bu */
+#define R_V850_CALLT_6_7_OFFSET 21 /* For callt */
+#define R_V850_CALLT_16_16_OFFSET 22 /* For callt */
+/* END CYGNUS LOCAL */
+#define R_V850_GNU_VTINHERIT 23
+#define R_V850_GNU_VTENTRY 24
+
+#define R_V850_NUM 25
+
+
__END_DECLS
#endif /* elf.h */
diff --git a/include/features.h b/include/features.h
index 21e36ae51..3d61b76d9 100644
--- a/include/features.h
+++ b/include/features.h
@@ -329,12 +329,16 @@
/* Some nice features only work properly with ELF */
#if defined HAVE_ELF
-# define link_warning(symbol, msg) \
- asm (".section " ".gnu.warning." #symbol "\n\t.previous"); \
- static const char __evoke_link_warning_##symbol[] \
+# define link_warning(symbol, msg) \
+ asm (".section " ".gnu.warning." #symbol "\n\t.previous"); \
+ static const char __evoke_link_warning_##symbol[] \
__attribute__ ((section (".gnu.warning." #symbol "\n\t#"))) = msg;
-# define weak_alias(name, aliasname) \
- asm(".global " #name ";.weak " #aliasname ";" #aliasname "=" #name ";");
+# define weak_alias(name, aliasname) \
+ asm(".global " C_SYMBOL_PREFIX #name ";" \
+ ".weak " C_SYMBOL_PREFIX #aliasname ";" \
+ C_SYMBOL_PREFIX #aliasname "=" C_SYMBOL_PREFIX #name ";");
+# define weak_symbol(name) \
+ asm(".weak " C_SYMBOL_PREFIX #name ";");
#else
# define link_warning(symbol, msg) \
asm (".stabs \"" msg "\",30,0,0,0\n\t" \