Merge pull request #616 from bjoernQ/avoid-overlapping-data-rwtext

Avoid overlapping .data / .rwtext
This commit is contained in:
Björn Quentin 2023-06-23 14:33:09 +02:00 committed by GitHub
commit 0d1d64d6e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 21 additions and 2 deletions

View File

@ -52,6 +52,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- ESP32-S3: Fix calculation of PSRAM start address
- Fixed wrong variable access (FOSC CLK calibration for ESP32-C6 #593)
- Fixed [trap location in ram](https://github.com/esp-rs/esp-hal/pull/605#issuecomment-1604039683) (#605)
- Fixed a possible overlap of `.data` and `.rwtext` (#616)
### Changed
- Improve examples documentation (#533)

View File

@ -8,10 +8,13 @@ SECTIONS {
*(.rodata .rodata.*)
*(.srodata .srodata.*)
_rodata_end = ABSOLUTE(.);
. = ALIGN(4);
} > RODATA
.rodata.wifi : ALIGN(4)
{
. = ALIGN(4);
*( .rodata_wlog_*.* )
. = ALIGN(4);
} > RODATA
}

View File

@ -3,7 +3,8 @@
SECTIONS {
.rtc_fast.text : {
. = ALIGN(4);
*(.rtc_fast.literal .rtc_fast.text .rtc_fast.literal.* .rtc_fast.text.*)
*(.rtc_fast.literal .rtc_fast.text .rtc_fast.literal.* .rtc_fast.text.*)
. = ALIGN(4);
} > RTC_FAST_RWTEXT AT > RODATA
.rtc_fast.data :
@ -12,6 +13,7 @@ SECTIONS {
_rtc_fast_data_start = ABSOLUTE(.);
*(.rtc_fast.data .rtc_fast.data.*)
_rtc_fast_data_end = ABSOLUTE(.);
. = ALIGN(4);
} > RTC_FAST_RWDATA AT > RODATA
.rtc_fast.bss (NOLOAD) :
@ -20,11 +22,13 @@ SECTIONS {
_rtc_fast_bss_start = ABSOLUTE(.);
*(.rtc_fast.bss .rtc_fast.bss.*)
_rtc_fast_bss_end = ABSOLUTE(.);
. = ALIGN(4);
} > RTC_FAST_RWDATA
.rtc_fast.noinit (NOLOAD) :
{
. = ALIGN(4);
*(.rtc_fast.noinit .rtc_fast.noinit.*)
. = ALIGN(4);
} > RTC_FAST_RWDATA
}

View File

@ -3,7 +3,8 @@
SECTIONS {
.rtc_slow.text : {
. = ALIGN(4);
*(.rtc_slow.literal .rtc_slow.text .rtc_slow.literal.* .rtc_slow.text.*)
*(.rtc_slow.literal .rtc_slow.text .rtc_slow.literal.* .rtc_slow.text.*)
. = ALIGN(4);
} > rtc_slow_seg AT > RODATA
.rtc_slow.data :
@ -12,6 +13,7 @@ SECTIONS {
_rtc_slow_data_start = ABSOLUTE(.);
*(.rtc_slow.data .rtc_slow.data.*)
_rtc_slow_data_end = ABSOLUTE(.);
. = ALIGN(4);
} > rtc_slow_seg AT > RODATA
.rtc_slow.bss (NOLOAD) :
@ -20,11 +22,13 @@ SECTIONS {
_rtc_slow_bss_start = ABSOLUTE(.);
*(.rtc_slow.bss .rtc_slow.bss.*)
_rtc_slow_bss_end = ABSOLUTE(.);
. = ALIGN(4);
} > rtc_slow_seg
.rtc_slow.noinit (NOLOAD) :
{
. = ALIGN(4);
*(.rtc_slow.noinit .rtc_slow.noinit.*)
. = ALIGN(4);
} > rtc_slow_seg
}

View File

@ -9,6 +9,7 @@ SECTIONS {
*(.data .data.*);
*(.data1)
_data_end = ABSOLUTE(.);
. = ALIGN(4);
} > RWDATA AT > RODATA
/* LMA of .data */
@ -32,18 +33,21 @@ SECTIONS {
*(.gnu.linkonce.b.*)
*(COMMON)
_bss_end = ABSOLUTE(.);
. = ALIGN(4);
} > RWDATA
.noinit (NOLOAD) : ALIGN(4)
{
. = ALIGN(4);
*(.noinit .noinit.*)
. = ALIGN(4);
} > RWDATA
.data.wifi :
{
. = ALIGN(4);
*( .dram1 .dram1.*)
. = ALIGN(4);
} > RWDATA AT > RODATA
/* must be last segment using RWDATA */

View File

@ -5,6 +5,7 @@ SECTIONS {
{
. = ALIGN (4);
*(.rwtext.literal .rwtext .rwtext.literal.* .rwtext.*)
. = ALIGN(4);
} > RWTEXT
.rwtext.wifi :
@ -16,5 +17,6 @@ SECTIONS {
*( .wifislpiram .wifislpiram.*)
*( .phyiram .phyiram.*)
*( .iram1 .iram1.*)
. = ALIGN(4);
} > RWTEXT AT > RODATA
}