]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Add some v850 elf constants
authorMiles Bader <miles@lsi.nec.co.jp>
Fri, 20 Dec 2002 14:18:29 +0000 (06:18 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Fri, 20 Dec 2002 14:18:29 +0000 (06:18 -0800)
These are used for the new in-kernel module loader (actually not all the
relocation types are used right now, but are included for completeness).

Only the EM_CYGNUS_V850 macro, which is in a global namespace, is added
to <linux/elf.h>; the relocation types, which are private to the v850,
are added to <asm-v850/elf.h>.  [Perhaps some other archs can do a
similar split, to reduce the bloat in <linux/elf.h>]

include/asm-v850/elf.h
include/linux/elf.h

index ee518cb6707df7e56ae9f5d0f1ee060980bc1361..0e42ae4ed5295d142bc2f8e2524118a44d9d59e3 100644 (file)
@@ -22,6 +22,31 @@ typedef struct user_fpu_struct elf_fpregset_t;
 #define elf_check_arch(x)  \
   ((x)->e_machine == EM_V850 || (x)->e_machine == EM_CYGNUS_V850)
 
+
+/* v850 relocation types.  */
+#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 */
+#define R_V850_NUM             17
+
+
 /*
  * These are used to set parameters in the core dumps.
  */
index 7c86181e776e2ceb6e67279d21824adfd2da2e14..2745227ff9292853695b1bb7c44b83be34c3b88c 100644 (file)
@@ -90,6 +90,9 @@ typedef __s64 Elf64_Sxword;
  */
 #define EM_ALPHA       0x9026
 
+/* Bogus old v850 magic number, used by old tools.  */
+#define EM_CYGNUS_V850 0x9080
+
 /*
  * This is the old interim value for S/390 architecture
  */