diff --git a/arm-link.c b/arm-link.c index 1901eb93..7f86fec7 100644 --- a/arm-link.c +++ b/arm-link.c @@ -379,12 +379,12 @@ void relocate(TCCState *s1, ElfW_Rel *rel, int type, unsigned char *ptr, addr_t (*(int *)ptr) |= x & 0x7fffffff; } case R_ARM_ABS32: - // case R_ARM_TARGET1: /* ??? as seen on NetBSD - FIXME! */ + case R_ARM_TARGET1: if (s1->output_type == TCC_OUTPUT_DLL) { esym_index = get_sym_attr(s1, sym_index, 0)->dyn_index; qrel->r_offset = rel->r_offset; if (esym_index) { - qrel->r_info = ELFW(R_INFO)(esym_index, type); + qrel->r_info = ELFW(R_INFO)(esym_index, R_ARM_TARGET1); qrel++; return; } else { @@ -435,7 +435,7 @@ void relocate(TCCState *s1, ElfW_Rel *rel, int type, unsigned char *ptr, addr_t /* do nothing */ return; default: - fprintf(stderr,"FIXME: handle reloc type %x at %x [%p] to %x\n", + fprintf(stderr,"FIXME: handle reloc type %d at %x [%p] to %x\n", type, (unsigned)addr, ptr, (unsigned)val); return; } diff --git a/lib/bcheck.c b/lib/bcheck.c index dedb753d..b512ef62 100644 --- a/lib/bcheck.c +++ b/lib/bcheck.c @@ -289,7 +289,7 @@ DLL_EXPORT char *__bound_strcat(char *dest, const char *src); DLL_EXPORT char *__bound_strchr(const char *string, int ch); DLL_EXPORT char *__bound_strdup(const char *s); -#if defined(__arm__) && defined(TCC_ARM_EABI) +#if defined(__arm__) && defined(__ARM_EABI__) DLL_EXPORT void *__bound___aeabi_memcpy(void *dst, const void *src, size_t size); DLL_EXPORT void *__bound___aeabi_memmove(void *dst, const void *src, size_t size); DLL_EXPORT void *__bound___aeabi_memmove4(void *dst, const void *src, size_t size); @@ -739,7 +739,7 @@ void __bound_new_region(void *p, size_t size) last = NULL; cur = alloca_list; while (cur) { -#if defined(__i386__) || (defined(__arm__) && !defined(TCC_ARM_EABI)) +#if defined(__i386__) || (defined(__arm__) && !defined(__ARM_EABI__)) int align = 4; #elif defined(__arm__) int align = 8; @@ -1738,7 +1738,7 @@ void *__bound_memset(void *s, int c, size_t n) return memset(s, c, n); } -#if defined(__arm__) && defined(TCC_ARM_EABI) +#if defined(__arm__) && defined(__ARM_EABI__) void *__bound___aeabi_memcpy(void *dest, const void *src, size_t n) { dprintf(stderr, "%s, %s(): %p, %p, 0x%lx\n",