aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2018-08-22 11:37:02 +0000
committerIain Sandoe <iains@gcc.gnu.org>2018-08-22 11:37:02 +0000
commit333a29f9e88dbe5ed6fc0c9a1852c98b58831c77 (patch)
treed7255a4ce68a1ba945a1e8fdbba6ddab680fdd5a /gcc/dwarf2out.c
parentacc2580750f930440cabe85650df8a2f20ff520d (diff)
downloadgcc-333a29f9e88dbe5ed6fc0c9a1852c98b58831c77.zip
gcc-333a29f9e88dbe5ed6fc0c9a1852c98b58831c77.tar.gz
gcc-333a29f9e88dbe5ed6fc0c9a1852c98b58831c77.tar.bz2
Fix FDE labels for Darwin
gcc/ PR bootstrap/81033 PR target/81733 PR target/52795 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New. (dwarf2out_switch_text_section): Generate a local label for the second function sub-section and apply it as the second FDE start label. * gcc/final.c (final_scan_insn_1): Emit second FDE label after the second sub-section start. From-SVN: r263763
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index edf1ac3..91af4e8 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -298,6 +298,10 @@ static unsigned int rnglist_idx;
#define FUNC_BEGIN_LABEL "LFB"
#endif
+#ifndef FUNC_SECOND_SECT_LABEL
+#define FUNC_SECOND_SECT_LABEL "LFSB"
+#endif
+
#ifndef FUNC_END_LABEL
#define FUNC_END_LABEL "LFE"
#endif
@@ -1213,21 +1217,24 @@ static void set_cur_line_info_table (section *);
void
dwarf2out_switch_text_section (void)
{
+ char label[MAX_ARTIFICIAL_LABEL_BYTES];
section *sect;
dw_fde_ref fde = cfun->fde;
gcc_assert (cfun && fde && fde->dw_fde_second_begin == NULL);
+ ASM_GENERATE_INTERNAL_LABEL (label, FUNC_SECOND_SECT_LABEL,
+ current_function_funcdef_no);
+
+ fde->dw_fde_second_begin = ggc_strdup (label);
if (!in_cold_section_p)
{
fde->dw_fde_end = crtl->subsections.cold_section_end_label;
- fde->dw_fde_second_begin = crtl->subsections.hot_section_label;
fde->dw_fde_second_end = crtl->subsections.hot_section_end_label;
}
else
{
fde->dw_fde_end = crtl->subsections.hot_section_end_label;
- fde->dw_fde_second_begin = crtl->subsections.cold_section_label;
fde->dw_fde_second_end = crtl->subsections.cold_section_end_label;
}
have_multiple_function_sections = true;