From af7223727d6df37cf573fb5a60b3d5dcd4e0db59 Mon Sep 17 00:00:00 2001 From: jiangguangming Date: Wed, 4 Jan 2023 13:39:18 +0800 Subject: [PATCH] ld: fix rtc.data rtc.bss section issues 1. rtc.data section: should include sbss srodata in rtc_wake_stub*.* 2. rtc.bss section: move rtc .bss .bss.* from rtc.data to rtc.bss --- components/esp_system/ld/esp32/sections.ld.in | 2 +- components/esp_system/ld/esp32c3/sections.ld.in | 4 ++-- components/esp_system/ld/esp32h2/sections.ld.in | 4 ++-- components/esp_system/ld/esp32s2/sections.ld.in | 2 +- components/esp_system/ld/esp32s3/sections.ld.in | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/esp_system/ld/esp32/sections.ld.in b/components/esp_system/ld/esp32/sections.ld.in index 5dffe85b09..089bc26f7e 100644 --- a/components/esp_system/ld/esp32/sections.ld.in +++ b/components/esp_system/ld/esp32/sections.ld.in @@ -63,7 +63,7 @@ SECTIONS mapping[rtc_data] - *rtc_wake_stub*.*(.data .rodata .data.* .rodata.* .bss .bss.*) + *rtc_wake_stub*.*(.data .rodata .data.* .rodata.*) _rtc_data_end = ABSOLUTE(.); } > rtc_data_location diff --git a/components/esp_system/ld/esp32c3/sections.ld.in b/components/esp_system/ld/esp32c3/sections.ld.in index d6670bf759..ac7ab6cfb8 100644 --- a/components/esp_system/ld/esp32c3/sections.ld.in +++ b/components/esp_system/ld/esp32c3/sections.ld.in @@ -59,7 +59,7 @@ SECTIONS mapping[rtc_data] - *rtc_wake_stub*.*(.data .rodata .data.* .rodata.* .bss .bss.*) + *rtc_wake_stub*.*(.data .rodata .data.* .rodata.* .srodata.*) _rtc_data_end = ABSOLUTE(.); } > rtc_data_location @@ -67,7 +67,7 @@ SECTIONS .rtc.bss (NOLOAD) : { _rtc_bss_start = ABSOLUTE(.); - *rtc_wake_stub*.*(.bss .bss.*) + *rtc_wake_stub*.*(.bss .bss.* .sbss .sbss.*) *rtc_wake_stub*.*(COMMON) mapping[rtc_bss] diff --git a/components/esp_system/ld/esp32h2/sections.ld.in b/components/esp_system/ld/esp32h2/sections.ld.in index 93239b0dec..de6dcbaf08 100644 --- a/components/esp_system/ld/esp32h2/sections.ld.in +++ b/components/esp_system/ld/esp32h2/sections.ld.in @@ -61,7 +61,7 @@ SECTIONS mapping[rtc_data] - *rtc_wake_stub*.*(.data .rodata .data.* .rodata.* .bss .bss.*) + *rtc_wake_stub*.*(.data .rodata .data.* .rodata.* .srodata.*) _rtc_data_end = ABSOLUTE(.); } > rtc_data_location @@ -69,7 +69,7 @@ SECTIONS .rtc.bss (NOLOAD) : { _rtc_bss_start = ABSOLUTE(.); - *rtc_wake_stub*.*(.bss .bss.*) + *rtc_wake_stub*.*(.bss .bss.* .sbss .sbss.*) *rtc_wake_stub*.*(COMMON) mapping[rtc_bss] diff --git a/components/esp_system/ld/esp32s2/sections.ld.in b/components/esp_system/ld/esp32s2/sections.ld.in index 899bca0af6..575e1e289e 100644 --- a/components/esp_system/ld/esp32s2/sections.ld.in +++ b/components/esp_system/ld/esp32s2/sections.ld.in @@ -71,7 +71,7 @@ SECTIONS mapping[rtc_data] - *rtc_wake_stub*.*(.data .rodata .data.* .rodata.* .bss .bss.*) + *rtc_wake_stub*.*(.data .rodata .data.* .rodata.*) _rtc_data_end = ABSOLUTE(.); } > rtc_data_location diff --git a/components/esp_system/ld/esp32s3/sections.ld.in b/components/esp_system/ld/esp32s3/sections.ld.in index ab48772187..efe69736e9 100644 --- a/components/esp_system/ld/esp32s3/sections.ld.in +++ b/components/esp_system/ld/esp32s3/sections.ld.in @@ -65,7 +65,7 @@ SECTIONS mapping[rtc_data] - *rtc_wake_stub*.*(.data .rodata .data.* .rodata.* .bss .bss.*) + *rtc_wake_stub*.*(.data .rodata .data.* .rodata.*) _rtc_data_end = ABSOLUTE(.); } > rtc_data_location