feat(cxx): get rid of _Unwind_SetEnableExceptionFdeSorting

This commit is contained in:
Alexey Lapshin
2024-03-06 00:11:14 +04:00
parent c541513749
commit 80efa2f96e
3 changed files with 1 additions and 10 deletions

View File

@@ -11,7 +11,6 @@ idf_component_register(SRCS "cxx_exception_stubs.cpp"
if(NOT CONFIG_CXX_EXCEPTIONS) if(NOT CONFIG_CXX_EXCEPTIONS)
set(WRAP_FUNCTIONS set(WRAP_FUNCTIONS
_Unwind_SetEnableExceptionFdeSorting
__register_frame_info_bases __register_frame_info_bases
__register_frame_info __register_frame_info
__register_frame __register_frame

View File

@@ -1,5 +1,5 @@
/* /*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD * SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
@@ -35,11 +35,6 @@ static T abort_return()
} }
// unwind-dw2-fde.o // unwind-dw2-fde.o
extern "C" void __wrap__Unwind_SetEnableExceptionFdeSorting(unsigned char enable)
{
abort();
}
extern "C" void __wrap___register_frame_info_bases (const void *begin, struct object *ob, void *tbase, void *dbase) extern "C" void __wrap___register_frame_info_bases (const void *begin, struct object *ob, void *tbase, void *dbase)
{ {
abort(); abort();

View File

@@ -144,8 +144,6 @@ const sys_startup_fn_t g_startup_fn[1] = { start_cpu0 };
#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS #ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
// workaround for C++ exception crashes // workaround for C++ exception crashes
void _Unwind_SetNoFunctionContextInstall(unsigned char enable) __attribute__((weak, alias("_Unwind_SetNoFunctionContextInstall_Default"))); void _Unwind_SetNoFunctionContextInstall(unsigned char enable) __attribute__((weak, alias("_Unwind_SetNoFunctionContextInstall_Default")));
// workaround for C++ exception large memory allocation
void _Unwind_SetEnableExceptionFdeSorting(unsigned char enable);
static IRAM_ATTR void _Unwind_SetNoFunctionContextInstall_Default(unsigned char enable __attribute__((unused))) static IRAM_ATTR void _Unwind_SetNoFunctionContextInstall_Default(unsigned char enable __attribute__((unused)))
{ {
@@ -542,7 +540,6 @@ ESP_SYSTEM_INIT_FN(init_components0, BIT(0), 200)
#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS #ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
ESP_EARLY_LOGD(TAG, "Setting C++ exception workarounds."); ESP_EARLY_LOGD(TAG, "Setting C++ exception workarounds.");
_Unwind_SetNoFunctionContextInstall(1); _Unwind_SetNoFunctionContextInstall(1);
_Unwind_SetEnableExceptionFdeSorting(0);
#endif // CONFIG_COMPILER_CXX_EXCEPTIONS #endif // CONFIG_COMPILER_CXX_EXCEPTIONS
return ESP_OK; return ESP_OK;