diff options
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/gcc/final.c b/gcc/final.c index d9c4f38..4f5d824 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -1728,9 +1728,8 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED, are writing to appropriately. */ if (flag_reorder_blocks_and_partition - && in_unlikely_text_section() && !scan_ahead_for_unlikely_executed_note (insn)) - text_section (); + function_section (current_function_decl); #ifdef TARGET_UNWIND_INFO targetm.asm_out.unwind_emit (asm_out_file, insn); @@ -1923,7 +1922,8 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED, basic blocks into separate sections of the .o file, we need to ensure the jump table ends up in the correct section... */ - if (flag_reorder_blocks_and_partition) + if (flag_reorder_blocks_and_partition + && targetm.have_named_sections) { rtx tmp_table, tmp_label; if (LABEL_P (insn) @@ -1933,11 +1933,8 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED, } else if (scan_ahead_for_unlikely_executed_note (insn)) unlikely_text_section (); - else - { - if (in_unlikely_text_section ()) - text_section (); - } + else if (in_unlikely_text_section ()) + function_section (current_function_decl); } if (app_on) |