Call to veneers in ARM mode
Since commit c6630ef92a
, Call to a veneer
when the final symbol to be reached is thumb is made through a blx
instruction. This is a mistake since veneers are ARM instructions and
should thus be called with a simple bl. This commit prevent the bl ->
blx conversion when a veneer is used.
This commit is contained in:
parent
061b5799cc
commit
14c99236da
1 changed files with 3 additions and 1 deletions
4
tccelf.c
4
tccelf.c
|
@ -615,8 +615,10 @@ ST_FUNC void relocate_section(TCCState *s1, Section *s)
|
||||||
#ifndef TCC_TARGET_PE
|
#ifndef TCC_TARGET_PE
|
||||||
if ((x & 3) || x >= 0x4000000 || x < -0x4000000)
|
if ((x & 3) || x >= 0x4000000 || x < -0x4000000)
|
||||||
if (!(x & 3) || !blx_avail || !is_call)
|
if (!(x & 3) || !blx_avail || !is_call)
|
||||||
if (s1->output_type == TCC_OUTPUT_MEMORY)
|
if (s1->output_type == TCC_OUTPUT_MEMORY) {
|
||||||
x += add_jmp_table(s1, val) - val; /* add veneer */
|
x += add_jmp_table(s1, val) - val; /* add veneer */
|
||||||
|
is_thumb = 0; /* Veneer uses ARM instructions */
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
if ((x & 3) || x >= 0x4000000 || x < -0x4000000)
|
if ((x & 3) || x >= 0x4000000 || x < -0x4000000)
|
||||||
if (!(x & 3) || !blx_avail || !is_call)
|
if (!(x & 3) || !blx_avail || !is_call)
|
||||||
|
|
Loading…
Reference in a new issue