NetBSD: Trying to fix reloc error 38 on arm - WIP
This commit is contained in:
parent
f9c3b61884
commit
760024bde9
2 changed files with 5 additions and 1 deletions
|
@ -45,6 +45,7 @@ int code_reloc (int reloc_type)
|
|||
case R_ARM_COPY:
|
||||
case R_ARM_GLOB_DAT:
|
||||
case R_ARM_NONE:
|
||||
case R_ARM_TARGET1:
|
||||
return 0;
|
||||
|
||||
case R_ARM_PC24:
|
||||
|
@ -87,6 +88,7 @@ int gotplt_entry_type (int reloc_type)
|
|||
case R_ARM_ABS32:
|
||||
case R_ARM_REL32:
|
||||
case R_ARM_V4BX:
|
||||
case R_ARM_TARGET1:
|
||||
return AUTO_GOTPLT_ENTRY;
|
||||
|
||||
case R_ARM_GOTPC:
|
||||
|
@ -359,11 +361,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! */
|
||||
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, R_ARM_ABS32);
|
||||
qrel->r_info = ELFW(R_INFO)(esym_index, type);
|
||||
qrel++;
|
||||
return;
|
||||
} else {
|
||||
|
|
1
elf.h
1
elf.h
|
@ -2501,6 +2501,7 @@ typedef Elf32_Addr Elf32_Conflict;
|
|||
#define R_ARM_LDR_SBREL_11_0 35
|
||||
#define R_ARM_ALU_SBREL_19_12 36
|
||||
#define R_ARM_ALU_SBREL_27_20 37
|
||||
#define R_ARM_TARGET1 38
|
||||
#define R_ARM_V4BX 40
|
||||
#define R_ARM_PREL31 42
|
||||
#define R_ARM_MOVW_ABS_NC 43
|
||||
|
|
Loading…
Reference in a new issue