History

OpenBSD: arm support update (WIP)

herman ten brugge committed 5 years ago

Commit 96e39231 parent 20dbfe92 files · +6 −6Browse files

Unified · Split

2 files
  1. arm-link.c +3 −3
  2. lib/bcheck.c +3 −3
arm-link.c+3−3
@@ -379,12 +379,12 @@ void relocate(TCCState *s1, ElfW_Rel *rel, int type, unsigned char *ptr, addr_t · 378 unmodified lines
379 (*(int *)ptr) |= x & 0x7fffffff;379 (*(int *)ptr) |= x & 0x7fffffff;
380 }380 }
381 case R_ARM_ABS32:381 case R_ARM_ABS32:
382 // case R_ARM_TARGET1: /* ??? as seen on NetBSD - FIXME! */382 case R_ARM_TARGET1:
383 if (s1->output_type == TCC_OUTPUT_DLL) {383 if (s1->output_type == TCC_OUTPUT_DLL) {
384 esym_index = get_sym_attr(s1, sym_index, 0)->dyn_index;384 esym_index = get_sym_attr(s1, sym_index, 0)->dyn_index;
385 qrel->r_offset = rel->r_offset;385 qrel->r_offset = rel->r_offset;
386 if (esym_index) {386 if (esym_index) {
387 qrel->r_info = ELFW(R_INFO)(esym_index, type);387 qrel->r_info = ELFW(R_INFO)(esym_index, R_ARM_TARGET1);
388 qrel++;388 qrel++;
389 return;389 return;
390 } else {390 } else {
@@ -435,7 +435,7 @@ void relocate(TCCState *s1, ElfW_Rel *rel, int type, unsigned char *ptr, addr_t · 44 unmodified lines
435 /* do nothing */435 /* do nothing */
436 return;436 return;
437 default:437 default:
438 fprintf(stderr,"FIXME: handle reloc type %x at %x [%p] to %x\n",438 fprintf(stderr,"FIXME: handle reloc type %d at %x [%p] to %x\n",
439 type, (unsigned)addr, ptr, (unsigned)val);439 type, (unsigned)addr, ptr, (unsigned)val);
440 return;440 return;
441 }441 }
lib/bcheck.c+3−3
@@ -289,7 +289,7 @@ DLL_EXPORT char *__bound_strcat(char *dest, const char *src); · 288 unmodified lines
289DLL_EXPORT char *__bound_strchr(const char *string, int ch);289DLL_EXPORT char *__bound_strchr(const char *string, int ch);
290DLL_EXPORT char *__bound_strdup(const char *s);290DLL_EXPORT char *__bound_strdup(const char *s);
291 291
292#if defined(__arm__) && defined(TCC_ARM_EABI)292#if defined(__arm__) && defined(__ARM_EABI__)
293DLL_EXPORT void *__bound___aeabi_memcpy(void *dst, const void *src, size_t size);293DLL_EXPORT void *__bound___aeabi_memcpy(void *dst, const void *src, size_t size);
294DLL_EXPORT void *__bound___aeabi_memmove(void *dst, const void *src, size_t size);294DLL_EXPORT void *__bound___aeabi_memmove(void *dst, const void *src, size_t size);
295DLL_EXPORT void *__bound___aeabi_memmove4(void *dst, const void *src, size_t size);295DLL_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) · 443 unmodified lines
739 last = NULL;739 last = NULL;
740 cur = alloca_list;740 cur = alloca_list;
741 while (cur) {741 while (cur) {
742#if defined(__i386__) || (defined(__arm__) && !defined(TCC_ARM_EABI))742#if defined(__i386__) || (defined(__arm__) && !defined(__ARM_EABI__))
743 int align = 4;743 int align = 4;
744#elif defined(__arm__)744#elif defined(__arm__)
745 int align = 8;745 int align = 8;
@@ -1738,7 +1738,7 @@ void *__bound_memset(void *s, int c, size_t n) · 992 unmodified lines
1738 return memset(s, c, n);1738 return memset(s, c, n);
1739}1739}
1740 1740
1741#if defined(__arm__) && defined(TCC_ARM_EABI)1741#if defined(__arm__) && defined(__ARM_EABI__)
1742void *__bound___aeabi_memcpy(void *dest, const void *src, size_t n)1742void *__bound___aeabi_memcpy(void *dest, const void *src, size_t n)
1743{1743{
1744 dprintf(stderr, "%s, %s(): %p, %p, 0x%lx\n",1744 dprintf(stderr, "%s, %s(): %p, %p, 0x%lx\n",

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t