Commit 0c907d80 authored by Miles Bader's avatar Miles Bader Committed by Linus Torvalds

[PATCH] Add some v850 elf constants

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>]
parent 285a7c9f
......@@ -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.
*/
......
......@@ -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
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment