diff --git a/esp32c3-hal/ld/db-riscv-link.x b/esp32c3-hal/ld/db-riscv-link.x index 7e061153da2..a57fdcdbede 100644 --- a/esp32c3-hal/ld/db-riscv-link.x +++ b/esp32c3-hal/ld/db-riscv-link.x @@ -94,7 +94,7 @@ SECTIONS _ebss = .; } > REGION_BSS - .rwtext ORIGIN(REGION_RWTEXT) + _data_size : AT(_text_size + _rodata_size + _data_size){ + .rwtext ORIGIN(REGION_RWTEXT) + _data_size : AT(_text_size + _rodata_size + _data_size + SIZEOF(.bss)) { _srwtext = .; *(.rwtext); . = ALIGN(4);