xtensa/esp32: Fix PSRAM support when Stack Smash protection is enabled

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
Gustavo Henrique Nihei 2022-12-13 17:58:29 -03:00 committed by Xiang Xiao
parent 03f07effc9
commit b6d9d4e92f

View File

@ -18,6 +18,8 @@
* *
****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h>
/* Default entry point: */ /* Default entry point: */
ENTRY(__start); ENTRY(__start);
@ -71,6 +73,9 @@ SECTIONS
_iram_text_start = ABSOLUTE(.); _iram_text_start = ABSOLUTE(.);
*(.iram1 .iram1.*) *(.iram1 .iram1.*)
*librtc.a:(.literal .text .literal.* .text.*) *librtc.a:(.literal .text .literal.* .text.*)
#ifdef CONFIG_STACK_CANARIES
*libc.a:lib_stackchk.*(.literal .text .literal.* .text.*)
#endif
*libarch.a:esp32_spiflash.*(.literal .text .literal.* .text.*) *libarch.a:esp32_spiflash.*(.literal .text .literal.* .text.*)
*libarch.a:xtensa_cpupause.*(.literal .text .literal.* .text.*) *libarch.a:xtensa_cpupause.*(.literal .text .literal.* .text.*)
*libarch.a:xtensa_copystate.*(.literal .text .literal.* .text.*) *libarch.a:xtensa_copystate.*(.literal .text .literal.* .text.*)
@ -130,6 +135,9 @@ SECTIONS
*(.share.mem) *(.share.mem)
*(.gnu.linkonce.b.*) *(.gnu.linkonce.b.*)
*(COMMON) *(COMMON)
#ifdef CONFIG_STACK_CANARIES
*libc.a:lib_stackchk.*(.bss .bss.* COMMON)
#endif
*libarch.a:esp32_spiflash.*(.bss .bss.* COMMON) *libarch.a:esp32_spiflash.*(.bss .bss.* COMMON)
*libarch.a:xtensa_cpupause.*(.bss .bss.* COMMON) *libarch.a:xtensa_cpupause.*(.bss .bss.* COMMON)
*libarch.a:xtensa_copystate.*(.bss .bss.* COMMON) *libarch.a:xtensa_copystate.*(.bss .bss.* COMMON)
@ -183,6 +191,9 @@ SECTIONS
KEEP (*(.jcr)) KEEP (*(.jcr))
*(.dram1 .dram1.*) *(.dram1 .dram1.*)
*libphy.a:(.rodata .rodata.*) *libphy.a:(.rodata .rodata.*)
#ifdef CONFIG_STACK_CANARIES
*libc.a:lib_stackchk.*(.rodata .rodata.*)
#endif
*libarch.a:esp32_spiflash.*(.rodata .rodata.*) *libarch.a:esp32_spiflash.*(.rodata .rodata.*)
*libarch.a:xtensa_cpupause.*(.rodata .rodata.*) *libarch.a:xtensa_cpupause.*(.rodata .rodata.*)
*libarch.a:xtensa_copystate.*(.rodata .rodata.*) *libarch.a:xtensa_copystate.*(.rodata .rodata.*)