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:
@@ -406,17 +406,21 @@ SECTIONS
|
||||
|
||||
.eh_frame_hdr :
|
||||
{
|
||||
#if CONFIG_COMPILER_CXX_EXCEPTIONS || CONFIG_ESP_SYSTEM_USE_EH_FRAME
|
||||
ALIGNED_SYMBOL(4, __eh_frame_hdr)
|
||||
|
||||
KEEP (*(.eh_frame_hdr))
|
||||
|
||||
__eh_frame_hdr_end = ABSOLUTE(.);
|
||||
#endif // CONFIG_COMPILER_CXX_EXCEPTIONS || CONFIG_ESP_SYSTEM_USE_EH_FRAME
|
||||
|
||||
. = ALIGN(ALIGNOF(.eh_frame));
|
||||
} > rodata_seg_low
|
||||
ASSERT_SECTIONS_GAP(.eh_frame_hdr, .eh_frame)
|
||||
|
||||
.eh_frame :
|
||||
{
|
||||
#if CONFIG_COMPILER_CXX_EXCEPTIONS || CONFIG_ESP_SYSTEM_USE_EH_FRAME
|
||||
ALIGNED_SYMBOL(4, __eh_frame)
|
||||
|
||||
KEEP (*(.eh_frame))
|
||||
@@ -427,6 +431,8 @@ SECTIONS
|
||||
LONG(0);
|
||||
|
||||
__eh_frame_end = ABSOLUTE(.);
|
||||
#endif // CONFIG_COMPILER_CXX_EXCEPTIONS || CONFIG_ESP_SYSTEM_USE_EH_FRAME
|
||||
|
||||
. = ALIGN(ALIGNOF(.flash.tdata));
|
||||
} > rodata_seg_low
|
||||
ASSERT_SECTIONS_GAP(.eh_frame, .flash.tdata)
|
||||
@@ -508,11 +514,18 @@ SECTIONS
|
||||
ALIGNED_SYMBOL(16, _heap_start_high)
|
||||
} > sram_high
|
||||
|
||||
/**
|
||||
* Discarding .rela.* sections results in the following mapping:
|
||||
* .rela.text.* -> .text.*
|
||||
* .rela.data.* -> .data.*
|
||||
* And so forth...
|
||||
*/
|
||||
/DISCARD/ : { *(.rela.*) }
|
||||
/DISCARD/ :
|
||||
{
|
||||
/**
|
||||
* Discarding .rela.* sections results in the following mapping:
|
||||
* .rela.text.* -> .text.*
|
||||
* .rela.data.* -> .data.*
|
||||
* And so forth...
|
||||
*/
|
||||
*(.rela.*)
|
||||
#if !(CONFIG_COMPILER_CXX_EXCEPTIONS || CONFIG_ESP_SYSTEM_USE_EH_FRAME)
|
||||
*(.eh_frame_hdr)
|
||||
*(.eh_frame)
|
||||
#endif // !(CONFIG_COMPILER_CXX_EXCEPTIONS || CONFIG_ESP_SYSTEM_USE_EH_FRAME)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user