esp_system: Fix esp32c2/esp32c3/esp32h2 TLS size

The change fixes thread-local-storage size by removing .srodata section
from it. It initially was included in TLS section by mistake.
The issue was found when stack size increased after building applications
with GCC-11.1 compiler. Stack size became bigger because some new data
appeared in .srodata. See more details here:
adce62f53d
This commit is contained in:
Alexey Lapshin 2022-06-17 13:54:09 +04:00
parent 228cbc4dae
commit 0f98788d59
12 changed files with 9 additions and 18 deletions

View File

@ -108,8 +108,6 @@ SECTIONS
*(.sdata) *(.sdata)
*(.sdata.*) *(.sdata.*)
*(.gnu.linkonce.s.*) *(.gnu.linkonce.s.*)
*(.sdata2)
*(.sdata2.*)
*(.gnu.linkonce.s2.*) *(.gnu.linkonce.s2.*)
*(.jcr) *(.jcr)
_data_end = ABSOLUTE(.); _data_end = ABSOLUTE(.);
@ -122,6 +120,7 @@ SECTIONS
*(.rodata.*) *(.rodata.*)
*(.gnu.linkonce.r.*) *(.gnu.linkonce.r.*)
*(.rodata1) *(.rodata1)
*(.sdata2 .sdata2.*)
__XT_EXCEPTION_TABLE_ = ABSOLUTE(.); __XT_EXCEPTION_TABLE_ = ABSOLUTE(.);
*(.xt_except_table) *(.xt_except_table)
*(.gcc_except_table) *(.gcc_except_table)

View File

@ -97,8 +97,6 @@ SECTIONS
*(.sdata) *(.sdata)
*(.sdata.*) *(.sdata.*)
*(.gnu.linkonce.s.*) *(.gnu.linkonce.s.*)
*(.sdata2)
*(.sdata2.*)
*(.gnu.linkonce.s2.*) *(.gnu.linkonce.s2.*)
*(.jcr) *(.jcr)
_data_end = ABSOLUTE(.); _data_end = ABSOLUTE(.);
@ -111,6 +109,7 @@ SECTIONS
*(.rodata.*) *(.rodata.*)
*(.gnu.linkonce.r.*) *(.gnu.linkonce.r.*)
*(.rodata1) *(.rodata1)
*(.sdata2 .sdata2.* .srodata .srodata.*)
__XT_EXCEPTION_TABLE_ = ABSOLUTE(.); __XT_EXCEPTION_TABLE_ = ABSOLUTE(.);
*(.xt_except_table) *(.xt_except_table)
*(.gcc_except_table) *(.gcc_except_table)

View File

@ -96,8 +96,6 @@ SECTIONS
*(.sdata) *(.sdata)
*(.sdata.*) *(.sdata.*)
*(.gnu.linkonce.s.*) *(.gnu.linkonce.s.*)
*(.sdata2)
*(.sdata2.*)
*(.gnu.linkonce.s2.*) *(.gnu.linkonce.s2.*)
*(.jcr) *(.jcr)
_data_end = ABSOLUTE(.); _data_end = ABSOLUTE(.);
@ -110,6 +108,7 @@ SECTIONS
*(.rodata.*) *(.rodata.*)
*(.gnu.linkonce.r.*) *(.gnu.linkonce.r.*)
*(.rodata1) *(.rodata1)
*(.sdata2 .sdata2.*)
__XT_EXCEPTION_TABLE_ = ABSOLUTE(.); __XT_EXCEPTION_TABLE_ = ABSOLUTE(.);
*(.xt_except_table) *(.xt_except_table)
*(.gcc_except_table) *(.gcc_except_table)

View File

@ -97,8 +97,6 @@ SECTIONS
*(.sdata) *(.sdata)
*(.sdata.*) *(.sdata.*)
*(.gnu.linkonce.s.*) *(.gnu.linkonce.s.*)
*(.sdata2)
*(.sdata2.*)
*(.gnu.linkonce.s2.*) *(.gnu.linkonce.s2.*)
*(.jcr) *(.jcr)
_data_end = ABSOLUTE(.); _data_end = ABSOLUTE(.);
@ -111,6 +109,7 @@ SECTIONS
*(.rodata.*) *(.rodata.*)
*(.gnu.linkonce.r.*) *(.gnu.linkonce.r.*)
*(.rodata1) *(.rodata1)
*(.sdata2 .sdata2.*)
__XT_EXCEPTION_TABLE_ = ABSOLUTE(.); __XT_EXCEPTION_TABLE_ = ABSOLUTE(.);
*(.xt_except_table) *(.xt_except_table)
*(.gcc_except_table) *(.gcc_except_table)

View File

@ -197,8 +197,6 @@ SECTIONS
*(.sdata) *(.sdata)
*(.sdata.*) *(.sdata.*)
*(.gnu.linkonce.s.*) *(.gnu.linkonce.s.*)
*(.sdata2)
*(.sdata2.*)
*(.gnu.linkonce.s2.*) *(.gnu.linkonce.s2.*)
*(.jcr) *(.jcr)

View File

@ -30,6 +30,7 @@ entries:
[sections:rodata] [sections:rodata]
entries: entries:
.rodata+ .rodata+
.sdata2+
[sections:rtc_text] [sections:rtc_text]
entries: entries:

View File

@ -170,8 +170,6 @@ SECTIONS
*(.sdata) *(.sdata)
*(.sdata.*) *(.sdata.*)
*(.gnu.linkonce.s.*) *(.gnu.linkonce.s.*)
*(.sdata2)
*(.sdata2.*)
*(.gnu.linkonce.s2.*) *(.gnu.linkonce.s2.*)
*(.jcr) *(.jcr)
@ -370,8 +368,6 @@ SECTIONS
*(.tdata.*) *(.tdata.*)
*(.tbss) *(.tbss)
*(.tbss.*) *(.tbss.*)
*(.srodata)
*(.srodata.*)
_thread_local_end = ABSOLUTE(.); _thread_local_end = ABSOLUTE(.);
_rodata_reserved_end = ABSOLUTE(.); _rodata_reserved_end = ABSOLUTE(.);
. = ALIGN(4); . = ALIGN(4);

View File

@ -18,6 +18,8 @@ entries:
[sections:rodata] [sections:rodata]
entries: entries:
.rodata+ .rodata+
.sdata2+
.srodata+
[sections:rtc_text] [sections:rtc_text]
entries: entries:

View File

@ -205,8 +205,6 @@ SECTIONS
*(.sdata) *(.sdata)
*(.sdata.*) *(.sdata.*)
*(.gnu.linkonce.s.*) *(.gnu.linkonce.s.*)
*(.sdata2)
*(.sdata2.*)
*(.gnu.linkonce.s2.*) *(.gnu.linkonce.s2.*)
*(.jcr) *(.jcr)

View File

@ -18,6 +18,7 @@ entries:
[sections:rodata] [sections:rodata]
entries: entries:
.rodata+ .rodata+
.sdata2+
[sections:rtc_text] [sections:rtc_text]
entries: entries:

View File

@ -208,8 +208,6 @@ SECTIONS
*(.sdata) *(.sdata)
*(.sdata.*) *(.sdata.*)
*(.gnu.linkonce.s.*) *(.gnu.linkonce.s.*)
*(.sdata2)
*(.sdata2.*)
*(.gnu.linkonce.s2.*) *(.gnu.linkonce.s2.*)
*(.jcr) *(.jcr)

View File

@ -18,6 +18,7 @@ entries:
[sections:rodata] [sections:rodata]
entries: entries:
.rodata+ .rodata+
.sdata2+
[sections:rtc_text] [sections:rtc_text]
entries: entries: