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
379379 (*(int *)ptr) |= x & 0x7fffffff;
380380 }
381381 case R_ARM_ABS32:
382− // case R_ARM_TARGET1: /* ??? as seen on NetBSD - FIXME! */
382+ case R_ARM_TARGET1:
383383 if (s1->output_type == TCC_OUTPUT_DLL) {
384384 esym_index = get_sym_attr(s1, sym_index, 0)->dyn_index;
385385 qrel->r_offset = rel->r_offset;
386386 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);
388388 qrel++;
389389 return;
390390 } else {
@@ -435,7 +435,7 @@ void relocate(TCCState *s1, ElfW_Rel *rel, int type, unsigned char *ptr, addr_t · 44 unmodified lines
435435 /* do nothing */
436436 return;
437437 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",
439439 type, (unsigned)addr, ptr, (unsigned)val);
440440 return;
441441 }
lib/bcheck.c+3−3
@@ -289,7 +289,7 @@ DLL_EXPORT char *__bound_strcat(char *dest, const char *src); · 288 unmodified lines
289289 DLL_EXPORT char *__bound_strchr(const char *string, int ch);
290290 DLL_EXPORT char *__bound_strdup(const char *s);
291291
292−#if defined(__arm__) && defined(TCC_ARM_EABI)
292+#if defined(__arm__) && defined(__ARM_EABI__)
293293 DLL_EXPORT void *__bound___aeabi_memcpy(void *dst, const void *src, size_t size);
294294 DLL_EXPORT void *__bound___aeabi_memmove(void *dst, const void *src, size_t size);
295295 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) · 443 unmodified lines
739739 last = NULL;
740740 cur = alloca_list;
741741 while (cur) {
742−#if defined(__i386__) || (defined(__arm__) && !defined(TCC_ARM_EABI))
742+#if defined(__i386__) || (defined(__arm__) && !defined(__ARM_EABI__))
743743 int align = 4;
744744 #elif defined(__arm__)
745745 int align = 8;
@@ -1738,7 +1738,7 @@ void *__bound_memset(void *s, int c, size_t n) · 992 unmodified lines
17381738 return memset(s, c, n);
17391739 }
17401740
1741−#if defined(__arm__) && defined(TCC_ARM_EABI)
1741+#if defined(__arm__) && defined(__ARM_EABI__)
17421742 void *__bound___aeabi_memcpy(void *dest, const void *src, size_t n)
17431743 {
17441744 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