History

Adjust relocation offset for thumb to ARM veneer

Thomas Preud'homme committed 12 years ago

Commit b2192fc1 parent d3d89901 file · +1 −1Browse files

Unified · Split

tccelf.c+1−1
@@ -1209,7 +1209,7 @@ ST_FUNC void build_got_entries(TCCState *s1) · 1208 unmodified lines
12091209 rel->r_info = ELFW(R_INFO)(index, type);
12101210 /* Create a thumb stub fonction to switch to ARM mode */
12111211 put_elf_reloc(symtab_section, text_section,
1212− text_section->data_offset, R_ARM_JUMP24,
1212+ text_section->data_offset + 4, R_ARM_JUMP24,
12131213 sym_index);
12141214 p = section_ptr_add(text_section, 8);
12151215 put32(p, 0x4778); /* bx pc */