aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@libertysurf.fr>2005-10-26 09:03:30 +0200
committerEric Botcazou <ebotcazou@gcc.gnu.org>2005-10-26 07:03:30 +0000
commit43f237b43f37cf15bd834e631aa82910cd9a50d8 (patch)
tree962005b9e688c09f1fafa66ca1b61ef6c984860e /gcc/dwarf2out.c
parent976e21f67321ad483895471c5f285a1880a47b4a (diff)
downloadgcc-43f237b43f37cf15bd834e631aa82910cd9a50d8.zip
gcc-43f237b43f37cf15bd834e631aa82910cd9a50d8.tar.gz
gcc-43f237b43f37cf15bd834e631aa82910cd9a50d8.tar.bz2
re PR rtl-optimization/24460 (Profiled bootstrap broken)
PR rtl-optimization/24460 * dwarf2out.c (have_switched_text_sections): New boolean variable. (dwarf2out_switch_text_section): Set it to true instead of incrementing separate_line_info_table_in_use. (output_loc_list): Additionally test have_switched_text_sections. (output_ranges): Likewise. (dwarf2out_finish): Likewise. * varasm.c (assemble_start_function): Do not call insert_section_boundary_note. (assemble_end_function): If flag_reorder_blocks_and_partition, switch to the function's section before emitting the .size directive. * bb-reorder.c (insert_section_boundary_note): Staticify. (rest_of_handle_reorder_blocks): Call insert_section_boundary_note. * output.h (insert_section_boundary_note): Delete. Co-Authored-By: Caroline Tice <ctice@apple.com> From-SVN: r105916
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 7ee5edb..8a5c4c2 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -3778,6 +3778,9 @@ static GTY(()) unsigned line_info_table_allocated;
/* Number of elements in line_info_table currently in use. */
static GTY(()) unsigned line_info_table_in_use;
+/* True if the compilation unit contains more than one .text section. */
+static GTY(()) bool have_switched_text_section = false;
+
/* A pointer to the base of a table that contains line information
for each source code line outside of .text in the compilation unit. */
static GTY ((length ("separate_line_info_table_allocated")))
@@ -6850,7 +6853,7 @@ dwarf2out_switch_text_section (void)
fde->dw_fde_hot_section_end_label = cfun->hot_section_end_label;
fde->dw_fde_unlikely_section_label = cfun->cold_section_label;
fde->dw_fde_unlikely_section_end_label = cfun->cold_section_end_label;
- separate_line_info_table_in_use++;
+ have_switched_text_section = true;
}
/* Output the location list given to us. */
@@ -6866,7 +6869,7 @@ output_loc_list (dw_loc_list_ref list_head)
for (curr = list_head; curr != NULL; curr = curr->dw_loc_next)
{
unsigned long size;
- if (separate_line_info_table_in_use == 0)
+ if (!separate_line_info_table_in_use && !have_switched_text_section)
{
dw2_asm_output_delta (DWARF2_ADDR_SIZE, curr->begin, curr->section,
"Location list begin address (%s)",
@@ -7375,7 +7378,7 @@ output_ranges (void)
/* If all code is in the text section, then the compilation
unit base address defaults to DW_AT_low_pc, which is the
base of the text section. */
- if (separate_line_info_table_in_use == 0)
+ if (!separate_line_info_table_in_use && !have_switched_text_section)
{
dw2_asm_output_delta (DWARF2_ADDR_SIZE, blabel,
text_section_label,
@@ -14096,7 +14099,7 @@ dwarf2out_finish (const char *filename)
/* We can only use the low/high_pc attributes if all of the code was
in .text. */
- if (separate_line_info_table_in_use == 0)
+ if (!separate_line_info_table_in_use && !have_switched_text_section)
{
add_AT_lbl_id (comp_unit_die, DW_AT_low_pc, text_section_label);
add_AT_lbl_id (comp_unit_die, DW_AT_high_pc, text_end_label);