Adjust relocation offset for thumb to ARM veneer
This commit is contained in:
parent
d3d89900f6
commit
b2192fc50b
1 changed files with 1 additions and 1 deletions
2
tccelf.c
2
tccelf.c
|
@ -1209,7 +1209,7 @@ ST_FUNC void build_got_entries(TCCState *s1)
|
||||||
rel->r_info = ELFW(R_INFO)(index, type);
|
rel->r_info = ELFW(R_INFO)(index, type);
|
||||||
/* Create a thumb stub fonction to switch to ARM mode */
|
/* Create a thumb stub fonction to switch to ARM mode */
|
||||||
put_elf_reloc(symtab_section, text_section,
|
put_elf_reloc(symtab_section, text_section,
|
||||||
text_section->data_offset, R_ARM_JUMP24,
|
text_section->data_offset + 4, R_ARM_JUMP24,
|
||||||
sym_index);
|
sym_index);
|
||||||
p = section_ptr_add(text_section, 8);
|
p = section_ptr_add(text_section, 8);
|
||||||
put32(p, 0x4778); /* bx pc */
|
put32(p, 0x4778); /* bx pc */
|
||||||
|
|
Loading…
Reference in a new issue