History

NetBSD: Trying to fix reloc error 38 on arm - WIP

Christian Jullien committed 5 years ago

Commit 760024b1 parent f9c3b612 files · +5 −1Browse files

Unified · Split

2 files
  1. arm-link.c +4 −1
  2. elf.h +1 −0
arm-link.c+4−1
@@ -45,6 +45,7 @@ int code_reloc (int reloc_type) · 44 unmodified lines
4545 case R_ARM_COPY:
4646 case R_ARM_GLOB_DAT:
4747 case R_ARM_NONE:
48+ case R_ARM_TARGET1:
4849 return 0;
4950
5051 case R_ARM_PC24:
@@ -87,6 +88,7 @@ int gotplt_entry_type (int reloc_type) · 36 unmodified lines
8788 case R_ARM_ABS32:
8889 case R_ARM_REL32:
8990 case R_ARM_V4BX:
91+ case R_ARM_TARGET1:
9092 return AUTO_GOTPLT_ENTRY;
9193
9294 case R_ARM_GOTPC:
@@ -359,11 +361,12 @@ void relocate(TCCState *s1, ElfW_Rel *rel, int type, unsigned char *ptr, addr_t · 266 unmodified lines
359361 (*(int *)ptr) |= x & 0x7fffffff;
360362 }
361363 case R_ARM_ABS32:
364+ // case R_ARM_TARGET1: /* ??? as seen on NetBSD - FIXME! */
362365 if (s1->output_type == TCC_OUTPUT_DLL) {
363366 esym_index = get_sym_attr(s1, sym_index, 0)->dyn_index;
364367 qrel->r_offset = rel->r_offset;
365368 if (esym_index) {
366− qrel->r_info = ELFW(R_INFO)(esym_index, R_ARM_ABS32);
369+ qrel->r_info = ELFW(R_INFO)(esym_index, type);
367370 qrel++;
368371 return;
369372 } else {
elf.h+1−0
@@ -2501,6 +2501,7 @@ typedef Elf32_Addr Elf32_Conflict; · 2500 unmodified lines
25012501 #define R_ARM_LDR_SBREL_11_0 35
25022502 #define R_ARM_ALU_SBREL_19_12 36
25032503 #define R_ARM_ALU_SBREL_27_20 37
2504+#define R_ARM_TARGET1 38
25042505 #define R_ARM_V4BX 40
25052506 #define R_ARM_PREL31 42
25062507 #define R_ARM_MOVW_ABS_NC 43

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