mirror of
https://github.com/frida/tinycc
synced 2024-11-23 16:19:35 +03:00
NetBSD: Trying to fix reloc error 38 on arm - WIP
This commit is contained in:
parent
c3b596afb7
commit
48bc44c5e6
@ -44,6 +44,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:
|
||||
@ -86,6 +87,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:
|
||||
@ -345,11 +347,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 {
|
||||
|
Loading…
Reference in New Issue
Block a user