mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-06 14:14:33 +02:00
Merge branch 'bugfix/flash_text_alignment_cache_issue' into 'master'
build: fix cache issue when .flash.text section alignment is uncommon Closes IDF-2992 See merge request espressif/esp-idf!12841
This commit is contained in:
@@ -237,9 +237,18 @@ SECTIONS
|
|||||||
_flash_cache_start = ABSOLUTE(0);
|
_flash_cache_start = ABSOLUTE(0);
|
||||||
} > default_code_seg
|
} > default_code_seg
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This dummy section represents the .flash.text section but in default_rodata_seg.
|
||||||
|
* Thus, it must have its alignement and (at least) its size.
|
||||||
|
*/
|
||||||
.flash_rodata_dummy (NOLOAD):
|
.flash_rodata_dummy (NOLOAD):
|
||||||
{
|
{
|
||||||
. = SIZEOF(.flash.text);
|
/* Start at the same alignement constraint than .flash.text */
|
||||||
|
. = ALIGN(ALIGNOF(.flash.text));
|
||||||
|
/* Create an empty gap as big as .flash.text section */
|
||||||
|
. = . + SIZEOF(.flash.text);
|
||||||
|
/* Prepare the alignement of the section above. Few bytes (0x20) must be
|
||||||
|
* added for the mapping header. */
|
||||||
. = ALIGN(0x10000) + 0x20;
|
. = ALIGN(0x10000) + 0x20;
|
||||||
_rodata_reserved_start = .;
|
_rodata_reserved_start = .;
|
||||||
} > default_rodata_seg
|
} > default_rodata_seg
|
||||||
|
@@ -268,9 +268,18 @@ SECTIONS
|
|||||||
_flash_cache_start = ABSOLUTE(0);
|
_flash_cache_start = ABSOLUTE(0);
|
||||||
} > default_code_seg
|
} > default_code_seg
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This dummy section represents the .flash.text section but in default_rodata_seg.
|
||||||
|
* Thus, it must have its alignement and (at least) its size.
|
||||||
|
*/
|
||||||
.flash_rodata_dummy (NOLOAD):
|
.flash_rodata_dummy (NOLOAD):
|
||||||
{
|
{
|
||||||
. = SIZEOF(.flash.text);
|
/* Start at the same alignement constraint than .flash.text */
|
||||||
|
. = ALIGN(ALIGNOF(.flash.text));
|
||||||
|
/* Create an empty gap as big as .flash.text section */
|
||||||
|
. = . + SIZEOF(.flash.text);
|
||||||
|
/* Prepare the alignement of the section above. Few bytes (0x20) must be
|
||||||
|
* added for the mapping header. */
|
||||||
. = ALIGN(0x10000) + 0x20;
|
. = ALIGN(0x10000) + 0x20;
|
||||||
_rodata_reserved_start = .;
|
_rodata_reserved_start = .;
|
||||||
} > default_rodata_seg
|
} > default_rodata_seg
|
||||||
|
Reference in New Issue
Block a user