aboutsummaryrefslogtreecommitdiff
path: root/tccelf.c
diff options
context:
space:
mode:
authorThomas Preud'homme <robotux@celest.fr>2014-03-11 21:45:52 +0800
committerThomas Preud'homme <robotux@celest.fr>2014-03-11 21:45:52 +0800
commitb2192fc50bb0cfddce1585f2cb2c920de66b4e07 (patch)
tree82c240088d90800a84d4edd5c5b1da9d2ca4647b /tccelf.c
parentd3d89900f6e0a052f2fc15482fca58ce95cb94d1 (diff)
downloadtinycc-b2192fc50bb0cfddce1585f2cb2c920de66b4e07.tar.gz
tinycc-b2192fc50bb0cfddce1585f2cb2c920de66b4e07.tar.bz2
Adjust relocation offset for thumb to ARM veneer
Diffstat (limited to 'tccelf.c')
-rw-r--r--tccelf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tccelf.c b/tccelf.c
index 424db69..e7054a3 100644
--- a/tccelf.c
+++ b/tccelf.c
@@ -1209,7 +1209,7 @@ ST_FUNC void build_got_entries(TCCState *s1)
rel->r_info = ELFW(R_INFO)(index, type);
/* Create a thumb stub fonction to switch to ARM mode */
put_elf_reloc(symtab_section, text_section,
- text_section->data_offset, R_ARM_JUMP24,
+ text_section->data_offset + 4, R_ARM_JUMP24,
sym_index);
p = section_ptr_add(text_section, 8);
put32(p, 0x4778); /* bx pc */