diff options
Diffstat (limited to 'arm64-link.c')
| -rw-r--r-- | arm64-link.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/arm64-link.c b/arm64-link.c index 581f1ee..c2842d4 100644 --- a/arm64-link.c +++ b/arm64-link.c @@ -1,7 +1,25 @@ -#include "tcc.h" +#ifdef TARGET_DEFS_ONLY + +#define EM_TCC_TARGET EM_AARCH64 + +#define R_DATA_32 R_AARCH64_ABS32 +#define R_DATA_PTR R_AARCH64_ABS64 +#define R_JMP_SLOT R_AARCH64_JUMP_SLOT +#define R_GLOB_DAT R_AARCH64_GLOB_DAT +#define R_COPY R_AARCH64_COPY + +#define R_NUM R_AARCH64_NUM + +#define ELF_START_ADDR 0x00400000 +#define ELF_PAGE_SIZE 0x1000 + #define HAVE_SECTION_RELOC -ST_DATA struct reloc_info relocs_info[] = { +#else /* !TARGET_DEFS_ONLY */ + +#include "tcc.h" + +ST_DATA struct reloc_info relocs_info[R_NUM] = { INIT_RELOC_INFO (R_AARCH64_ABS32, 0, NO_GOTPLT_ENTRY, 0) INIT_RELOC_INFO (R_AARCH64_ABS64, 0, NO_GOTPLT_ENTRY, 0) INIT_RELOC_INFO (R_AARCH64_MOVW_UABS_G0_NC, 0, NO_GOTPLT_ENTRY, 0) @@ -111,3 +129,5 @@ void relocate(TCCState *s1, ElfW_Rel *rel, int type, char *ptr, addr_t addr, add return; } } + +#endif /* !TARGET_DEFS_ONLY */ |
