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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user