diff options
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-xtensa.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c index 31c0b6b..18307c1 100644 --- a/gas/config/tc-xtensa.c +++ b/gas/config/tc-xtensa.c @@ -10808,13 +10808,21 @@ xtensa_move_literals (void) frchain_to = NULL; frag_splice = &(frchain_from->frch_root); - while (!search_frag->tc_frag_data.literal_frag) + while (search_frag && !search_frag->tc_frag_data.literal_frag) { gas_assert (search_frag->fr_fix == 0 || search_frag->fr_type == rs_align); search_frag = search_frag->fr_next; } + if (!search_frag) + { + search_frag = frchain_from->frch_root; + as_bad_where (search_frag->fr_file, search_frag->fr_line, + _("literal pool location required for text-section-literals; specify with .literal_position")); + continue; + } + gas_assert (search_frag->tc_frag_data.literal_frag->fr_subtype == RELAX_LITERAL_POOL_BEGIN); xtensa_switch_section_emit_state (&state, segment->seg, 0); |