From 9d6c3632e85dc71dc0944da793623e8bbf2d6d8f Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Mon, 6 Jul 2020 16:40:38 +1000 Subject: [PATCH] bootloader: Fix regression burning efuses late in boot process APB clock get functions not included in iram_loader_seg, meaning could be overwritten by app depending on app IRAM size and linker layout. Regression in dd5190868a4e3f189bbfae2898dd9f983f632a35 Closes https://github.com/espressif/esp-idf/issues/5456 --- components/bootloader/subproject/main/esp32.bootloader.ld | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/bootloader/subproject/main/esp32.bootloader.ld b/components/bootloader/subproject/main/esp32.bootloader.ld index 1eb345f76..7bba4b469 100644 --- a/components/bootloader/subproject/main/esp32.bootloader.ld +++ b/components/bootloader/subproject/main/esp32.bootloader.ld @@ -40,6 +40,7 @@ SECTIONS *(.iram1 .iram1.*) /* catch stray IRAM_ATTR */ *liblog.a:(.literal .text .literal.* .text.*) *libgcc.a:(.literal .text .literal.* .text.*) + *libbootloader_support.a:bootloader_clock.*(.literal.esp_clk_apb_freq .text.esp_clk_apb_freq) *libbootloader_support.a:bootloader_common.*(.literal .text .literal.* .text.*) *libbootloader_support.a:bootloader_flash.*(.literal .text .literal.* .text.*) *libbootloader_support.a:bootloader_random.*(.literal .text .literal.* .text.*) @@ -52,6 +53,7 @@ SECTIONS *libbootloader_support.a:secure_boot_signatures.*(.literal .text .literal.* .text.*) *libmicro-ecc.a:*.*(.literal .text .literal.* .text.*) *libspi_flash.a:*.*(.literal .text .literal.* .text.*) + *libsoc.a:rtc_clk.*(.literal.rtc_clk_apb_freq_get .text.rtc_clk_apb_freq_get) *libsoc.a:rtc_wdt.*(.literal .text .literal.* .text.*) *libefuse.a:*.*(.literal .text .literal.* .text.*) *(.fini.literal)