fix(esp_system): fix binary generation error when no eh_frame but TLS
ERROR: A fatal error occurred: Segment loaded at 0x3c01d150 lands in same 64KB flash mapping as segment loaded at 0x3c018020. Can't generate binary. Suggest changing linker script or ELF to merge sections. Seems binary generator does not handle well empty sections that contains aligning only. I did not investigate much but this change helped.
This commit is contained in:
@@ -227,19 +227,18 @@ SECTIONS
|
||||
_esp_system_init_fn_array_end = ABSOLUTE(.);
|
||||
|
||||
_rodata_end = ABSOLUTE(.);
|
||||
. = ALIGN(ALIGNOF(.eh_frame_hdr));
|
||||
. = ALIGN(ALIGNOF(SECTION_AFTER_FLASH_RODATA));
|
||||
} > default_rodata_seg
|
||||
ASSERT_SECTIONS_GAP(.flash.rodata, .eh_frame_hdr)
|
||||
ASSERT_SECTIONS_GAP(.flash.rodata, SECTION_AFTER_FLASH_RODATA)
|
||||
|
||||
#if EH_FRAME_LINKING_ENABLED
|
||||
.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));
|
||||
} > default_rodata_seg
|
||||
@@ -247,7 +246,6 @@ SECTIONS
|
||||
|
||||
.eh_frame :
|
||||
{
|
||||
#if CONFIG_COMPILER_CXX_EXCEPTIONS || CONFIG_ESP_SYSTEM_USE_EH_FRAME
|
||||
ALIGNED_SYMBOL(4, __eh_frame)
|
||||
|
||||
KEEP (*(.eh_frame))
|
||||
@@ -258,11 +256,11 @@ SECTIONS
|
||||
LONG(0);
|
||||
|
||||
__eh_frame_end = ABSOLUTE(.);
|
||||
#endif // CONFIG_COMPILER_CXX_EXCEPTIONS || CONFIG_ESP_SYSTEM_USE_EH_FRAME
|
||||
|
||||
. = ALIGN(ALIGNOF(.flash.tdata));
|
||||
} > default_rodata_seg
|
||||
ASSERT_SECTIONS_GAP(.eh_frame, .flash.tdata)
|
||||
#endif // EH_FRAME_LINKING_ENABLED
|
||||
|
||||
.flash.tdata :
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user