mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-18 12:24:38 +08:00
gas: xtensa: fix trampoline placement
For jumps requiring multiple trampolines trampoline placement code may place multiple sequential trampolines into the same frag. Don't do that. gas/ 2018-02-13 Max Filippov <jcmvbkbc@gmail.com> * config/tc-xtensa.c (xg_find_best_trampoline): Skip trampoline frag that contains source address.
This commit is contained in:
parent
24b9144d4b
commit
db5d5ad16f
@ -1,3 +1,8 @@
|
||||
2018-02-13 Max Filippov <jcmvbkbc@gmail.com>
|
||||
|
||||
* config/tc-xtensa.c (xg_find_best_trampoline): Skip trampoline
|
||||
frag that contains source address.
|
||||
|
||||
2018-02-13 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR 22773
|
||||
|
@ -9339,6 +9339,12 @@ static size_t xg_find_best_trampoline (struct trampoline_index *idx,
|
||||
trampoline_frag->fr_address > target))
|
||||
continue;
|
||||
|
||||
/* Don't choose trampoline that contains the source. */
|
||||
if (source >= trampoline_frag->fr_address
|
||||
&& source <= trampoline_frag->fr_address +
|
||||
trampoline_frag->fr_fix)
|
||||
continue;
|
||||
|
||||
off = trampoline_frag->fr_address - fulcrum;
|
||||
/* Stop if some trampoline is found and the search is more than
|
||||
J_RANGE / 4 from the projected fulcrum. A trampoline w/o jump
|
||||
|
Loading…
Reference in New Issue
Block a user