From a6c721b24c6d6920fa8a4bed8c59e726a237f68d Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Thu, 1 Jul 2021 16:00:35 +0200 Subject: [PATCH] esp32[s2,s3]: fix _flash_rodata_align value in the linker scripts Regression from 4702feeee. The TLS segment is located inside .flash.rodata, so we need to get the alignment of that section, not .flash.rodata_noload. --- components/esp32/ld/esp32.project.ld.in | 4 ++-- components/esp32s2/ld/esp32s2.project.ld.in | 4 ++-- components/esp32s3/ld/esp32s3.project.ld.in | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/esp32/ld/esp32.project.ld.in b/components/esp32/ld/esp32.project.ld.in index f58878ac9e..b60a4a12e0 100644 --- a/components/esp32/ld/esp32.project.ld.in +++ b/components/esp32/ld/esp32.project.ld.in @@ -311,14 +311,14 @@ SECTIONS . = ALIGN(4); } >default_rodata_seg + _flash_rodata_align = ALIGNOF(.flash.rodata); + .flash.rodata_noload (NOLOAD) : { . = ALIGN (4); mapping[rodata_noload] } > default_rodata_seg - _flash_rodata_align = ALIGNOF(.flash.rodata_noload); - .flash.text : { _stext = .; diff --git a/components/esp32s2/ld/esp32s2.project.ld.in b/components/esp32s2/ld/esp32s2.project.ld.in index c99ec5bab5..e4cd142753 100644 --- a/components/esp32s2/ld/esp32s2.project.ld.in +++ b/components/esp32s2/ld/esp32s2.project.ld.in @@ -325,14 +325,14 @@ SECTIONS . = ALIGN(4); } >default_rodata_seg + _flash_rodata_align = ALIGNOF(.flash.rodata); + .flash.rodata_noload (NOLOAD) : { . = ALIGN (4); mapping[rodata_noload] } > default_rodata_seg - _flash_rodata_align = ALIGNOF(.flash.rodata_noload); - .flash.text : { _stext = .; diff --git a/components/esp32s3/ld/esp32s3.project.ld.in b/components/esp32s3/ld/esp32s3.project.ld.in index 92e3d669be..00303d1ffe 100644 --- a/components/esp32s3/ld/esp32s3.project.ld.in +++ b/components/esp32s3/ld/esp32s3.project.ld.in @@ -363,14 +363,14 @@ SECTIONS . = ALIGN(4); } > default_rodata_seg + _flash_rodata_align = ALIGNOF(.flash.rodata); + .flash.rodata_noload (NOLOAD) : { . = ALIGN (4); mapping[rodata_noload] } > default_rodata_seg - _flash_rodata_align = ALIGNOF(.flash.rodata_noload); - /* Marks the end of IRAM code segment */ .iram0.text_end (NOLOAD) : {