mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
fix(system): discard eh_frame sections if disabled in sdkconfig
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "sdkconfig.h"
|
||||
|
||||
/* Default entry point */
|
||||
ENTRY(call_start_cpu0);
|
||||
|
||||
@@ -340,9 +342,11 @@ SECTIONS
|
||||
*(.gnu.linkonce.e.*)
|
||||
*(.gnu.version_r)
|
||||
. = (. + 3) & ~ 3;
|
||||
#if CONFIG_COMPILER_CXX_EXCEPTIONS
|
||||
__eh_frame = ABSOLUTE(.);
|
||||
KEEP(*(.eh_frame))
|
||||
. = (. + 7) & ~ 3;
|
||||
#endif // CONFIG_COMPILER_CXX_EXCEPTIONS
|
||||
/* C++ constructor and destructor tables */
|
||||
/* Don't include anything from crtbegin.o or crtend.o, as IDF doesn't use toolchain crt */
|
||||
__init_array_start = ABSOLUTE(.);
|
||||
@@ -473,12 +477,20 @@ SECTIONS
|
||||
*/
|
||||
.xt.prop 0 :
|
||||
{
|
||||
KEEP (*(.xt.prop .gnu.linkonce.prop.*))
|
||||
KEEP (*(.xt.prop .xt.prop.* .gnu.linkonce.prop.*))
|
||||
}
|
||||
|
||||
.xt.lit 0 :
|
||||
{
|
||||
KEEP (*(.xt.lit .gnu.linkonce.p.*))
|
||||
KEEP (*(.xt.lit .xt.lit.* .gnu.linkonce.p.*))
|
||||
}
|
||||
|
||||
/DISCARD/ :
|
||||
{
|
||||
*(.eh_frame_hdr)
|
||||
#if !CONFIG_COMPILER_CXX_EXCEPTIONS
|
||||
*(.eh_frame)
|
||||
#endif // !CONFIG_COMPILER_CXX_EXCEPTIONS
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user