summaryrefslogtreecommitdiff
path: root/libbsd
diff options
context:
space:
mode:
authorPeng Fan <van.freenix@gmail.com>2013-09-05 10:14:42 +0800
committerPeng Fan <van.freenix@gmail.com>2013-09-05 13:47:39 +0800
commit2053ce659489720a98ef33ced6b2e63721cbc3f4 (patch)
treec55bdf87469307f1e5bae23680236c91402f9e42 /libbsd
parent0b41f6ca89bb130b66f1acc0caffda9100f53f0f (diff)
M32r support
Signed-off-by: Peng Fan <van.freenix@gmail.com>
Diffstat (limited to 'libbsd')
-rw-r--r--libbsd/include/arch/m32r/machine/ansi.h0
-rw-r--r--libbsd/include/arch/m32r/machine/asm.h2
-rw-r--r--libbsd/include/arch/m32r/machine/cdefs.h0
-rw-r--r--libbsd/include/arch/m32r/machine/elf_machdep.h39
-rw-r--r--libbsd/include/arch/m32r/machine/int_types.h0
5 files changed, 41 insertions, 0 deletions
diff --git a/libbsd/include/arch/m32r/machine/ansi.h b/libbsd/include/arch/m32r/machine/ansi.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/libbsd/include/arch/m32r/machine/ansi.h
diff --git a/libbsd/include/arch/m32r/machine/asm.h b/libbsd/include/arch/m32r/machine/asm.h
new file mode 100644
index 0000000..b3a7a95
--- /dev/null
+++ b/libbsd/include/arch/m32r/machine/asm.h
@@ -0,0 +1,2 @@
+
+#define __CONCAT(x,y) x ## y
diff --git a/libbsd/include/arch/m32r/machine/cdefs.h b/libbsd/include/arch/m32r/machine/cdefs.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/libbsd/include/arch/m32r/machine/cdefs.h
diff --git a/libbsd/include/arch/m32r/machine/elf_machdep.h b/libbsd/include/arch/m32r/machine/elf_machdep.h
new file mode 100644
index 0000000..3f531cf
--- /dev/null
+++ b/libbsd/include/arch/m32r/machine/elf_machdep.h
@@ -0,0 +1,39 @@
+#define ELF32_MACHDEP_ENDIANNESS ELFDATA2MSB
+
+#define ELF32_MACHDEP_ID_CASES \
+ case EM_M32R: \
+ break;
+
+#define ELF32_MACHDEP_ID EM_M32R
+
+#define ARCH_ELFSIZE 32
+
+#define R_M32R_NONE 0
+/*-----------OLD TYPE-------------*/
+#define R_M32R_16 1
+#define R_M32R_32 2
+#define R_M32R_24 3
+#define R_M32R_10_PCREL 4
+#define R_M32R_18_PCREL 5
+#define R_M32R_26_PCREL 6
+#define R_M32R_HI16_ULO 7
+#define R_M32R_HI16_SLO 8
+#define R_M32R_LO16 9
+#define R_M32R_SDA16 10
+#define R_M32R_GNU_VTINHERIT 11
+#define R_M32R_GNU_VTENTRY 12
+/*--------------------------------*/
+
+#define R_M32R_16_RELA 33
+#define R_M32R_32_RELA 34
+#define R_M32R_24_RELA 35
+#define R_M32R_18_PCREL_RELA 37
+#define R_M32R_26_PCREL_RELA 38
+#define R_M32R_HI16_ULO_RELA 39
+#define R_M32R_HI16_SLO_RELA 40
+#define R_M32R_LO16_RELA 41
+#define R_M32R_SDA16_RELA 42
+#define R_M32R_RELA_GNU_VTINHERIT 43
+#define R_M32R_RELA_GNU_VTENTRY 44
+
+#define R_TYPE(name) __CONCAT(R_M32R_,name)
diff --git a/libbsd/include/arch/m32r/machine/int_types.h b/libbsd/include/arch/m32r/machine/int_types.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/libbsd/include/arch/m32r/machine/int_types.h