diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2017-03-22 10:19:14 -0700 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2017-03-22 10:35:18 -0700 |
commit | 24e5b4e682a92788ffa676e963b7f1dec2101333 (patch) | |
tree | 1614beef70ad72f45104e801d64c98548ea53f95 /gas/doc | |
parent | b67aeab02c05fdd654f132a550dd4f196cb1f6d3 (diff) | |
download | gdb-24e5b4e682a92788ffa676e963b7f1dec2101333.zip gdb-24e5b4e682a92788ffa676e963b7f1dec2101333.tar.gz gdb-24e5b4e682a92788ffa676e963b7f1dec2101333.tar.bz2 |
gas: xtensa: make trampolines relaxation work with jumps in slots other than 0
add_jump_to_trampoline assumes that jump instruction is in slot 0,
when it's in other slot that results in fixup that references NULL symbol,
which results in segfault later in xtensa_make_cached_fixup.
Search for the non-NULL symbol in the tc_frag_data.slot_symbols and check
that there's exactly one such slot.
xtensa_relax_frag for RELAX_TRAMPOLINE reassigns fixup from the original
instruction with jump to generated jump in the trampoline frag, but does not
fix its fx_r_type or fx_size. That results in "undecodable fix" or
"fixup not contained within frag" error messages during relaxation.
Fix both these fields.
gas/
2017-03-22 Max Filippov <jcmvbkbc@gmail.com>
* config/tc-xtensa.c (xtensa_relax_frag): Change fx_size of the
reassigned fixup to size of jump instruction (3) and fx_r_type
to BFD_RELOC_XTENSA_SLOT0_OP, as there's only one slot.
(add_jump_to_trampoline): Search
origfrag->tc_frag_data.slot_symbols for the slot with non-NULL
symbol and use that slot instead of slot 0.
Diffstat (limited to 'gas/doc')
0 files changed, 0 insertions, 0 deletions