Skip to content

Commit e2a6740

Browse files
author
dmi3
committed
Updated ld-script link.ld
1 parent 53255ba commit e2a6740

File tree

1 file changed

+17
-28
lines changed

1 file changed

+17
-28
lines changed

src/link.ld

+17-28
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ MEMORY
88

99
SECTIONS
1010
{
11-
12-
. = 0x10000000;
13-
1411
.init :
1512
{
1613
KEEP (*(SORT_NONE(.init)))
@@ -26,11 +23,18 @@ SECTIONS
2623
*(.interrupt_handler)
2724
} > RAM_MEM
2825

29-
.rodata ALIGN(8) :
26+
.data ALIGN(8) :
3027
{
31-
*(.rodata)
32-
} > RAM_MEM
33-
28+
*(.rodata)
29+
*(.data)
30+
. = ALIGN(8);
31+
PROVIDE(__global_pointer$ = . + 0x800);
32+
. = ALIGN(8);
33+
*(.sdata)
34+
*(.srodata)
35+
} >RAM_MEM
36+
PROVIDE(_edata = .);
37+
PROVIDE(edata = .);
3438

3539
.preinit_array ALIGN(8) :
3640
{
@@ -47,35 +51,20 @@ SECTIONS
4751
PROVIDE_HIDDEN (__init_array_end = .);
4852
} > RAM_MEM
4953

50-
51-
.data ALIGN(8) :
52-
{
53-
*(.data)
54-
} > RAM_MEM
55-
.sdata ALIGN(8) :
56-
{
57-
PROVIDE( __global_pointer$ = . + 0x800 );
58-
*(.sdata)
59-
} > RAM_MEM
60-
PROVIDE(_edata = .);
61-
62-
6354
PROVIDE( __bss_start = . );
6455
.bss ALIGN(8) :
6556
{
6657
*(.sbss)
6758
*(.bss)
59+
*(COMMON)
6860
} > RAM_MEM
6961
PROVIDE( __bss_end = . );
7062

71-
7263
PROVIDE(exit = .);
73-
_exit = exit;
74-
64+
PROVIDE(_exit = exit);
7565

76-
PROVIDE( _end = . );
77-
PROVIDE( end = . );
66+
PROVIDE(_end = .);
67+
PROVIDE(end = .);
7868

79-
PROVIDE( _sp = 0x100f0000); /*stack*/
80-
81-
}
69+
PROVIDE(_sp = 0x10080000); /*stack*/
70+
}

0 commit comments

Comments
 (0)