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:
Alexey Lapshin
2024-08-04 23:05:36 +07:00
parent 1232759fb7
commit d0f05cd690
12 changed files with 48 additions and 53 deletions
+10
View File
@@ -78,3 +78,13 @@ ASSERT((ADDR(NEXT_SECTION) == ADDR(PREV_SECTION) + SIZEOF(PREV_SECTION)), \
#define ALIGNED_SYMBOL(X, SYMBOL) \
\n . = ALIGN(X); \
\n SYMBOL = ABSOLUTE(.);
#if CONFIG_COMPILER_CXX_EXCEPTIONS || CONFIG_ESP_SYSTEM_USE_EH_FRAME
#define EH_FRAME_LINKING_ENABLED 1
#endif
#if EH_FRAME_LINKING_ENABLED
#define SECTION_AFTER_FLASH_RODATA .eh_frame_hdr
#else
#define SECTION_AFTER_FLASH_RODATA .flash.tdata
#endif