https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89093
--- Comment #64 from Bernd Edlinger <bernd.edlinger at hotmail dot de> --- Okay, using Ian's suggestion I've got this now: Index: libphobos/libdruntime/gcc/deh.d =================================================================== --- libphobos/libdruntime/gcc/deh.d (revision 270395) +++ libphobos/libdruntime/gcc/deh.d (working copy) @@ -28,6 +28,7 @@ import gcc.unwind.pe; import gcc.builtins; import gcc.config; +import gcc.attribute; extern(C) { @@ -519,10 +520,19 @@ terminate("unwind error", __LINE__); } +static if (GNU_ARM_EABI_Unwinder) +{ + enum personality_fn_attributes = attribute("target", ("general-regs-only")); +} +else +{ + enum personality_fn_attributes = ""; +} /** * Read and extract information from the LSDA (.gcc_except_table section). */ +@personality_fn_attributes _Unwind_Reason_Code scanLSDA(const(ubyte)* lsda, _Unwind_Exception_Class exceptionClass, _Unwind_Action actions, _Unwind_Exception* unwindHeader, _Unwind_Context* context, _Unwind_Word cfa, @@ -772,6 +782,7 @@ * Called when the personality function has found neither a cleanup or handler. * To support ARM EABI personality routines, that must also unwind the stack. */ +@personality_fn_attributes _Unwind_Reason_Code CONTINUE_UNWINDING(_Unwind_Exception* unwindHeader, _Unwind_Context* context) { static if (GNU_ARM_EABI_Unwinder) @@ -814,6 +825,7 @@ static if (GNU_ARM_EABI_Unwinder) { pragma(mangle, PERSONALITY_FUNCTION) + @personality_fn_attributes extern(C) _Unwind_Reason_Code gdc_personality(_Unwind_State state, _Unwind_Exception* unwindHeader, _Unwind_Context* context) @@ -873,6 +885,7 @@ } } +@personality_fn_attributes private _Unwind_Reason_Code __gdc_personality(_Unwind_Action actions, _Unwind_Exception_Class exceptionClass, _Unwind_Exception* unwindHeader,