Ah, now I see it in the 4.4 version. Your backport is wrong then, you must not return true from dwarf2out_do_cfi_asm when !eh_personality_libfunc, but HAVE_GAS_CFI_SECTIONS_DIRECTIVE is 0 and not emitting normal unwind info.
Either you want:
int
dwarf2out_do_cfi_asm (void)
{
int enc;
#ifdef MIPS_DEBUGGING_INFO
return false;
#endif
if (!flag_dwarf2_cfi_asm || !dwarf2out_do_frame ())
return false;
if (saved_do_cfi_asm)
return true;
if (eh_personality_libfunc)
{
if (!HAVE_GAS_CFI_PERSONALITY_DIRECTIVE)
return false;
/* Make sure the personality encoding is one the assembler can support.
In particular, aligned addresses can't be handled. */
enc = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/2,/*global=*/1);
if ((enc & 0x70) != 0 && (enc & 0x70) != DW_EH_PE_pcrel)
return false;
enc = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/0,/*global=*/0);
if ((enc & 0x70) != 0 && (enc & 0x70) != DW_EH_PE_pcrel)
return false;
}
if (!HAVE_GAS_CFI_SECTIONS_DIRECTIVE)
{
#ifdef TARGET_UNWIND_INFO
return false;
#else
if (USING_SJLJ_EXCEPTIONS || (!flag_unwind_tables && !flag_exceptions))
return false;
#endif
}
saved_do_cfi_asm = true;
return true;
}
or move the !HAVE_GAS_CFI_SECTIONS_DIRECTIVE tests in between if (saved_do_cfi_asm) return true; and if (!eh_personality_libfunc) return true;.
Ah, now I see it in the 4.4 version. Your backport is wrong then, you must not return true from dwarf2out_ do_cfi_ asm when !eh_personality _libfunc, but HAVE_GAS_ CFI_SECTIONS_ DIRECTIVE is 0 and not emitting normal unwind info.
Either you want: do_cfi_ asm (void)
int
dwarf2out_
{
int enc;
#ifdef MIPS_DEBUGGING_INFO dwarf2_ cfi_asm || !dwarf2out_do_frame ()) _libfunc) GAS_CFI_ PERSONALITY_ DIRECTIVE)
return false;
#endif
if (!flag_
return false;
if (saved_do_cfi_asm)
return true;
if (eh_personality
{
if (!HAVE_
return false;
/* Make sure the personality encoding is one the assembler can support. EH_DATA_ FORMAT (/*code= */2,/*global= */1); EH_DATA_ FORMAT (/*code= */0,/*global= */0);
In particular, aligned addresses can't be handled. */
enc = ASM_PREFERRED_
if ((enc & 0x70) != 0 && (enc & 0x70) != DW_EH_PE_pcrel)
return false;
enc = ASM_PREFERRED_
if ((enc & 0x70) != 0 && (enc & 0x70) != DW_EH_PE_pcrel)
return false;
}
if (!HAVE_ GAS_CFI_ SECTIONS_ DIRECTIVE) SJLJ_EXCEPTIONS || (!flag_ unwind_ tables && !flag_exceptions))
{
#ifdef TARGET_UNWIND_INFO
return false;
#else
if (USING_
return false;
#endif
}
saved_do_cfi_asm = true;
return true;
}
or move the !HAVE_GAS_ CFI_SECTIONS_ DIRECTIVE tests in between if (saved_do_cfi_asm) return true; and if (!eh_personalit y_libfunc) return true;.