Skip to content

Commit 4e6a512

Browse files
committed
move read-only constants to flash
1 parent e9f26d2 commit 4e6a512

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

ch32v305/lib/Ld/Link.ld

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ SECTIONS
5555
*(.text.*)
5656
*(.rodata)
5757
*(.rodata*)
58+
*(.gnu.linkonce.r.*)
59+
*(.srodata .srodata.*)
5860
*(.gnu.linkonce.t.*)
5961
. = ALIGN(4);
6062
} >FLASH AT>FLASH
@@ -136,20 +138,13 @@ SECTIONS
136138

137139
.data :
138140
{
139-
*(.gnu.linkonce.r.*)
140141
*(.data .data.*)
141142
*(.gnu.linkonce.d.*)
142143
. = ALIGN(8);
143144
PROVIDE( __global_pointer$ = . + 0x800 );
144145
*(.sdata .sdata.*)
145-
*(.sdata2.*)
146+
*(.sdata2 .sdata2.*)
146147
*(.gnu.linkonce.s.*)
147-
. = ALIGN(8);
148-
*(.srodata.cst16)
149-
*(.srodata.cst8)
150-
*(.srodata.cst4)
151-
*(.srodata.cst2)
152-
*(.srodata .srodata.*)
153148
. = ALIGN(4);
154149
PROVIDE( _edata = .);
155150
} >RAM AT>FLASH
@@ -178,4 +173,3 @@ SECTIONS
178173

179174
}
180175

181-

0 commit comments

Comments
 (0)