This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch releases/12.11
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/releases/12.11 by this push:
new 9bedf16be96 boards/xtensa: fix the issue of undefined symbol reference
errors occurring during compilation and linking phase when the configuration
(CONFIG_ESP32S3_APP_FORMAT_LEGACY=y) is enabled.
9bedf16be96 is described below
commit 9bedf16be96e73b3680bc4f773e805245c74880b
Author: nuttxs <[email protected]>
AuthorDate: Wed Sep 10 19:14:08 2025 +0800
boards/xtensa: fix the issue of undefined symbol reference errors occurring
during compilation and linking phase when the configuration
(CONFIG_ESP32S3_APP_FORMAT_LEGACY=y) is enabled.
---
boards/xtensa/esp32/common/scripts/legacy_sections.ld | 9 +++++++++
boards/xtensa/esp32s3/common/scripts/legacy_sections.ld | 9 +++++++++
2 files changed, 18 insertions(+)
diff --git a/boards/xtensa/esp32/common/scripts/legacy_sections.ld
b/boards/xtensa/esp32/common/scripts/legacy_sections.ld
index b1db8bf6276..4c960f3be64 100644
--- a/boards/xtensa/esp32/common/scripts/legacy_sections.ld
+++ b/boards/xtensa/esp32/common/scripts/legacy_sections.ld
@@ -308,16 +308,25 @@ SECTIONS
/* C++ constructor and destructor tables, properly ordered: */
_sinit = ABSOLUTE(.);
+ __init_array_start = ABSOLUTE(.);
KEEP (*crtbegin.o(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
_einit = ABSOLUTE(.);
+ __init_array_end = ABSOLUTE(.);
KEEP (*crtbegin.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
+ /* System init functions registered via ESP_SYSTEM_INIT_FN */
+
+ . = ALIGN(4);
+ _esp_system_init_fn_array_start = ABSOLUTE(.);
+ KEEP (*(SORT_BY_INIT_PRIORITY(.esp_system_init_fn.*)))
+ _esp_system_init_fn_array_end = ABSOLUTE(.);
+
/* C++ exception handlers table: */
__XT_EXCEPTION_DESCS_ = ABSOLUTE(.);
diff --git a/boards/xtensa/esp32s3/common/scripts/legacy_sections.ld
b/boards/xtensa/esp32s3/common/scripts/legacy_sections.ld
index 11d8c88e833..3bedd957fa0 100644
--- a/boards/xtensa/esp32s3/common/scripts/legacy_sections.ld
+++ b/boards/xtensa/esp32s3/common/scripts/legacy_sections.ld
@@ -331,16 +331,25 @@ SECTIONS
/* C++ constructor and destructor tables, properly ordered: */
_sinit = ABSOLUTE(.);
+ __init_array_start = ABSOLUTE(.);
KEEP (*crtbegin.o(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
+ __init_array_end = ABSOLUTE(.);
_einit = ABSOLUTE(.);
KEEP (*crtbegin.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
+ /* System init functions registered via ESP_SYSTEM_INIT_FN */
+
+ . = ALIGN(4);
+ _esp_system_init_fn_array_start = ABSOLUTE(.);
+ KEEP (*(SORT_BY_INIT_PRIORITY(.esp_system_init_fn.*)))
+ _esp_system_init_fn_array_end = ABSOLUTE(.);
+
/* C++ exception handlers table: */
__XT_EXCEPTION_DESCS_ = ABSOLUTE(.);