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 : {