linker: esp32: fix linker to enable proper MMU usage
ESP32 flash_mmap() function requires `_rodata_reserved_start` address to be at the beginning of RODATA. This allows adding memory-mapped flash areas. Fixes #52764 Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This commit is contained in:
parent
38f8a4db28
commit
3f5ea785f2
4 changed files with 7 additions and 6 deletions
|
@ -130,6 +130,7 @@ SECTIONS
|
|||
|
||||
SECTION_PROLOGUE(_RODATA_SECTION_NAME,,)
|
||||
{
|
||||
_rodata_reserved_start = ABSOLUTE(.);
|
||||
_rodata_start = ABSOLUTE(.);
|
||||
|
||||
*(.rodata_desc .rodata_desc.*)
|
||||
|
@ -186,7 +187,6 @@ SECTIONS
|
|||
*(.rodata_wlog)
|
||||
*(.rodata_wlog*)
|
||||
_thread_local_end = ABSOLUTE(.);
|
||||
_rodata_reserved_end = ABSOLUTE(.);
|
||||
. = ALIGN(4);
|
||||
} GROUP_DATA_LINK_IN(RODATA_REGION, ROMABLE_REGION)
|
||||
|
||||
|
@ -203,6 +203,7 @@ SECTIONS
|
|||
* This is used to calculate the size of the _image_drom_size variable */
|
||||
SECTION_PROLOGUE(_RODATA_SECTION_END,,)
|
||||
{
|
||||
_rodata_reserved_end = ABSOLUTE(.);
|
||||
. = ALIGN(4);
|
||||
_image_rodata_end = ABSOLUTE(.);
|
||||
} GROUP_DATA_LINK_IN(RODATA_REGION, ROMABLE_REGION)
|
||||
|
@ -402,7 +403,6 @@ SECTIONS
|
|||
{
|
||||
. = SIZEOF(_RODATA_SECTION_NAME);
|
||||
. = ALIGN(0x10000) + 0x20;
|
||||
_rodata_reserved_start = .;
|
||||
} GROUP_LINK_IN(FLASH_CODE_REGION)
|
||||
|
||||
.flash.text : ALIGN(IROM_SEG_ALIGN)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue