From 71e5f5e3032f4d97aac5d10e2a4915a6e1fc054b Mon Sep 17 00:00:00 2001 From: "Zhuoran.Rong" Date: Thu, 26 Nov 2020 11:20:17 +0800 Subject: [PATCH] fix issue #18 --- components/bl602/bl602/evb/ld/flash.ld | 17 +++++++++++++++++ components/bl602/bl602/evb/ld/ram.ld | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/components/bl602/bl602/evb/ld/flash.ld b/components/bl602/bl602/evb/ld/flash.ld index a84b17fd..27d740bc 100644 --- a/components/bl602/bl602/evb/ld/flash.ld +++ b/components/bl602/bl602/evb/ld/flash.ld @@ -67,6 +67,23 @@ SECTIONS *(.gnu.linkonce.r.*) } > flash + + .preinit_array : + { + . = ALIGN(4); + __preinit_array_start = .; + KEEP (*(.preinit_array)) + __preinit_array_end = .; + } > flash + + .init_array : + { + . = ALIGN(4); + __init_array_start = .; + KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*))) + KEEP (*(.init_array)) + __init_array_end = .; + } > flash /*put wifibss in the first place*/ .wifibss (NOLOAD) : diff --git a/components/bl602/bl602/evb/ld/ram.ld b/components/bl602/bl602/evb/ld/ram.ld index 34530641..9dc9ee6e 100644 --- a/components/bl602/bl602/evb/ld/ram.ld +++ b/components/bl602/bl602/evb/ld/ram.ld @@ -23,6 +23,23 @@ SECTIONS *(.text .text.*) *(.gnu.linkonce.t.*) } >ram + + .preinit_array : + { + . = ALIGN(4); + __preinit_array_start = .; + KEEP (*(.preinit_array)) + __preinit_array_end = .; + } > ram + + .init_array : + { + . = ALIGN(4); + __init_array_start = .; + KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*))) + KEEP (*(.init_array)) + __init_array_end = .; + } > ram .rodata : {