From 48ff4c293b3a2dc52e4964e3c3461b3912259b03 Mon Sep 17 00:00:00 2001 From: bjoernQ Date: Thu, 6 Apr 2023 13:28:07 +0200 Subject: [PATCH] Minor linker script additions --- esp-hal-common/ld/sections/rodata.x | 1 + esp32-hal/ld/link-esp32.x | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/esp-hal-common/ld/sections/rodata.x b/esp-hal-common/ld/sections/rodata.x index 842087e7c..2d9bd9c05 100644 --- a/esp-hal-common/ld/sections/rodata.x +++ b/esp-hal-common/ld/sections/rodata.x @@ -6,6 +6,7 @@ SECTIONS { _rodata_start = ABSOLUTE(.); . = ALIGN (4); *(.rodata .rodata.*) + *(.srodata .srodata.*) _rodata_end = ABSOLUTE(.); } > RODATA diff --git a/esp32-hal/ld/link-esp32.x b/esp32-hal/ld/link-esp32.x index ca04ab68c..776e4b649 100644 --- a/esp32-hal/ld/link-esp32.x +++ b/esp32-hal/ld/link-esp32.x @@ -28,6 +28,13 @@ INCLUDE "rtc_slow.x" INCLUDE "external.x" /* End of Shared sections */ +// an uninitialized section for use as the wifi-heap in esp-wifi +SECTIONS { + .dram2_uninit (NOLOAD) : ALIGN(4) { + *(.dram2_uninit) + } > dram2_seg +} + _heap_end = ABSOLUTE(ORIGIN(dram_seg))+LENGTH(dram_seg) - 2*STACK_SIZE; _stack_start_cpu1 = _heap_end;