Skip to content

Commit a5006ee

Browse files
authored
Merge pull request pine64#19 from Virus-V/master
fix issue pine64#18
2 parents 25fb041 + 71e5f5e commit a5006ee

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

components/bl602/bl602/evb/ld/flash.ld

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,23 @@ SECTIONS
6767

6868
*(.gnu.linkonce.r.*)
6969
} > flash
70+
71+
.preinit_array :
72+
{
73+
. = ALIGN(4);
74+
__preinit_array_start = .;
75+
KEEP (*(.preinit_array))
76+
__preinit_array_end = .;
77+
} > flash
78+
79+
.init_array :
80+
{
81+
. = ALIGN(4);
82+
__init_array_start = .;
83+
KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*)))
84+
KEEP (*(.init_array))
85+
__init_array_end = .;
86+
} > flash
7087

7188
/*put wifibss in the first place*/
7289
.wifibss (NOLOAD) :

components/bl602/bl602/evb/ld/ram.ld

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,23 @@ SECTIONS
2323
*(.text .text.*)
2424
*(.gnu.linkonce.t.*)
2525
} >ram
26+
27+
.preinit_array :
28+
{
29+
. = ALIGN(4);
30+
__preinit_array_start = .;
31+
KEEP (*(.preinit_array))
32+
__preinit_array_end = .;
33+
} > ram
34+
35+
.init_array :
36+
{
37+
. = ALIGN(4);
38+
__init_array_start = .;
39+
KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*)))
40+
KEEP (*(.init_array))
41+
__init_array_end = .;
42+
} > ram
2643

2744
.rodata :
2845
{

0 commit comments

Comments
 (0)