Index: src/amiga-library.h ================================================================== --- src/amiga-library.h +++ src/amiga-library.h @@ -70,9 +70,11 @@ /* Needed only by ObjFW. */ int (*_Nonnull vsnprintf)(const char *_Nonnull restrict, size_t, const char *_Nonnull restrict, va_list); void (*_Nonnull exit)(int); char *_Nullable (*_Nonnull setlocale)(int, const char *_Nullable); + int (*_Nonnull _Unwind_Backtrace)(int (*_Nonnull)(void *_Nonnull, + void *_Null_unspecified), void *_Null_unspecified); }; extern bool of_init(unsigned int version, struct of_libc *libc, FILE **sF); #endif Index: src/amiga-library.m ================================================================== --- src/amiga-library.m +++ src/amiga-library.m @@ -537,10 +537,16 @@ char * setlocale(int category, const char *locale) { return libc.setlocale(category, locale); } + +int +_Unwind_Backtrace(int (*callback)(void *, void *), void *data) +{ + return libc._Unwind_Backtrace(callback, data); +} #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wpedantic" static CONST_APTR functionTable[] = { #ifdef OF_MORPHOS Index: src/runtime/linklib/linklib.m ================================================================== --- src/runtime/linklib/linklib.m +++ src/runtime/linklib/linklib.m @@ -106,15 +106,25 @@ if (initialized) return; if ((ObjFWRTBase = OpenLibrary(OBJFWRT_AMIGA_LIB, OBJFWRT_LIB_MINOR)) == NULL) { + /* + * The linklib is used by objfw(68k).library as well, so we + * can't have the compiler optimize this to another function, + * hence the use of an unnecessary format specifier. + */ fprintf(stderr, "Failed to open %s!\n", OBJFWRT_AMIGA_LIB); abort(); } if (!glue_objc_init(1, &libc, __sF)) { + /* + * The linklib is used by objfw(68k).library as well, so we + * can't have the compiler optimize this to another function, + * hence the use of an unnecessary format specifier. + */ fprintf(stderr, "Failed to initialize %s!\n", OBJFWRT_AMIGA_LIB); abort(); }