aboutsummaryrefslogtreecommitdiff
path: root/arm-link.c
diff options
context:
space:
mode:
Diffstat (limited to 'arm-link.c')
-rw-r--r--arm-link.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/arm-link.c b/arm-link.c
index 396c2c0..02f8196 100644
--- a/arm-link.c
+++ b/arm-link.c
@@ -1,7 +1,31 @@
-#include "tcc.h"
+#ifdef TARGET_DEFS_ONLY
+
+#define EM_TCC_TARGET EM_ARM
+
+/* relocation type for 32 bit data relocation */
+#define R_DATA_32 R_ARM_ABS32
+#define R_DATA_PTR R_ARM_ABS32
+#define R_JMP_SLOT R_ARM_JUMP_SLOT
+#define R_GLOB_DAT R_ARM_GLOB_DAT
+#define R_COPY R_ARM_COPY
+
+#define R_NUM R_ARM_NUM
+
+#define ELF_START_ADDR 0x00008000
+#define ELF_PAGE_SIZE 0x1000
+
#define HAVE_SECTION_RELOC
-ST_DATA struct reloc_info relocs_info[] = {
+enum float_abi {
+ ARM_SOFTFP_FLOAT,
+ ARM_HARD_FLOAT,
+};
+
+#else /* !TARGET_DEFS_ONLY */
+
+#include "tcc.h"
+
+ST_DATA struct reloc_info relocs_info[R_NUM] = {
INIT_RELOC_INFO (R_ARM_PC24, 1, AUTO_GOTPLT_ENTRY, 0)
INIT_RELOC_INFO (R_ARM_CALL, 1, AUTO_GOTPLT_ENTRY, 0)
INIT_RELOC_INFO (R_ARM_JUMP24, 1, AUTO_GOTPLT_ENTRY, 0)
@@ -248,3 +272,5 @@ void relocate(TCCState *s1, ElfW_Rel *rel, int type, char *ptr, addr_t addr, add
return;
}
}
+
+#endif /* !TARGET_DEFS_ONLY */