https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81470
Olivier Hainque <hainque at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #42747|[patch] don't emit |don't emit description|.cfi_personality/.cfi_lsda |.cfi_personality/.cfi_lsda |for !dwarf2 eh |for !dwarf2 eh --- Comment #11 from Olivier Hainque <hainque at gcc dot gnu.org> --- Comment on attachment 42747 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42747 don't emit .cfi_personality/.cfi_lsda for !dwarf2 eh >diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c >index 3d619b8..62b5c77 100644 >--- a/gcc/dwarf2out.c >+++ b/gcc/dwarf2out.c >@@ -958,10 +958,16 @@ dwarf2out_do_cfi_startproc (bool second) > { > int enc; > rtx ref; >- rtx personality = get_personality_function (current_function_decl); > > fprintf (asm_out_file, "\t.cfi_startproc\n"); > >+ /* .cfi_personality and .cfi_lsda are only relevant to DWARF2 >+ eh unwinders. */ >+ if (targetm_common.except_unwind_info (&global_options) != UI_DWARF2) >+ return; >+ >+ rtx personality = get_personality_function (current_function_decl); >+ > if (personality) > { > enc = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/2, /*global=*/1);