forked from cpq/bare-metal-programming-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlink.ld
152 lines (142 loc) · 3.88 KB
/
link.ld
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
MEMORY {
iache (rwx) : ORIGIN = 0X4037c000, LENGTH = 16k
iram (rwx) : ORIGIN = 0x40380400, LENGTH = 32k
dram (rw) : ORIGIN = 0x3fc80000 + LENGTH(iram), LENGTH = 128k
}
_eram = ORIGIN(dram) + LENGTH(dram);
ENTRY(Reset_Handler)
SECTIONS {
.text : { *(.text) *(.text*) } > iram
.data : {
. = ALIGN(16);
_sdata = .;
*(.data)
*(.data*)
*(.sdata)
*(.sdata*)
*(.srodata)
*(.srodata*)
*(.rodata)
*(.rodata*)
*(.gnu.linkonce.r.*)
*(.rodata1)
*(.riscv.*)
. = ALIGN(16);
_edata = .;
} > dram
.bss (NOLOAD): {
. = ALIGN(16);
_sbss = .;
*(.bss)
*(.bss*)
*(.sbss)
*(.sbss*)
*(COMMON)
. = ALIGN(16);
_ebss = .;
} > dram
. = ALIGN(16);
PROVIDE(end = .);
PROVIDE(_end = .);
}
PROVIDE(memset = 0x40000354);
PROVIDE(memcpy = 0x40000358);
PROVIDE(memmove = 0x4000035c);
PROVIDE(memcmp = 0x40000360);
PROVIDE(strcpy = 0x40000364);
PROVIDE(strncpy = 0x40000368);
PROVIDE(strcmp = 0x4000036c);
PROVIDE(strncmp = 0x40000370);
PROVIDE(strlen = 0x40000374);
PROVIDE(strstr = 0x40000378);
PROVIDE(bzero = 0x4000037c);
PROVIDE(isalnum = 0x40000388);
PROVIDE(isalpha = 0x4000038c);
PROVIDE(isascii = 0x40000390);
PROVIDE(isblank = 0x40000394);
PROVIDE(iscntrl = 0x40000398);
PROVIDE(isdigit = 0x4000039c);
PROVIDE(islower = 0x400003a0);
PROVIDE(isgraph = 0x400003a4);
PROVIDE(isprint = 0x400003a8);
PROVIDE(ispunct = 0x400003ac);
PROVIDE(isspace = 0x400003b0);
PROVIDE(isupper = 0x400003b4);
PROVIDE(toupper = 0x400003b8);
PROVIDE(tolower = 0x400003bc);
PROVIDE(toascii = 0x400003c0);
PROVIDE(memccpy = 0x400003c4);
PROVIDE(memchr = 0x400003c8);
PROVIDE(memrchr = 0x400003cc);
PROVIDE(strcasecmp = 0x400003d0);
PROVIDE(strcasestr = 0x400003d4);
PROVIDE(strcat = 0x400003d8);
PROVIDE(strdup = 0x400003dc);
PROVIDE(strchr = 0x400003e0);
PROVIDE(strcspn = 0x400003e4);
PROVIDE(strcoll = 0x400003e8);
PROVIDE(strlcat = 0x400003ec);
PROVIDE(strlcpy = 0x400003f0);
PROVIDE(strlwr = 0x400003f4);
PROVIDE(strncasecmp = 0x400003f8);
PROVIDE(strncat = 0x400003fc);
PROVIDE(strndup = 0x40000400);
PROVIDE(strnlen = 0x40000404);
PROVIDE(strrchr = 0x40000408);
PROVIDE(strsep = 0x4000040c);
PROVIDE(strspn = 0x40000410);
PROVIDE(strtok_r = 0x40000414);
PROVIDE(strupr = 0x40000418);
PROVIDE(longjmp = 0x4000041c);
PROVIDE(setjmp = 0x40000420);
PROVIDE(abs = 0x40000424);
PROVIDE(div = 0x40000428);
PROVIDE(labs = 0x4000042c);
PROVIDE(ldiv = 0x40000430);
PROVIDE(qsort = 0x40000434);
PROVIDE(rand_r = 0x40000438);
PROVIDE(rand = 0x4000043c);
PROVIDE(srand = 0x40000440);
PROVIDE(utoa = 0x40000444);
PROVIDE(itoa = 0x40000448);
PROVIDE(atoi = 0x4000044c);
PROVIDE(atol = 0x40000450);
PROVIDE(strtol = 0x40000454);
PROVIDE(strtoul = 0x40000458);
PROVIDE(printf = 0x40000040);
PROVIDE(__udivdi3 = 0x400008ac);
PROVIDE(__umoddi3 = 0x400008bc);
/*
PROVIDE(__sprint_r = 0x40000480);
PROVIDE(_fiprintf_r = 0x40000484);
PROVIDE(_fprintf_r = 0x40000488);
PROVIDE(_printf_common = 0x4000048c);
PROVIDE(_printf_i = 0x40000490);
PROVIDE(_vfiprintf_r = 0x40000494);
PROVIDE(_vfprintf_r = 0x40000498);
PROVIDE(fiprintf = 0x4000049c);
PROVIDE(fprintf = 0x400004a0);
PROVIDE(XXXprintf = 0x400004a4);
PROVIDE(vfiprintf = 0x400004a8);
PROVIDE(vfprintf = 0x400004ac);
*/
PROVIDE(uart_tx_one_char = 0x40000068);
PROVIDE(uart_tx_one_char2 = 0x4000006c);
PROVIDE(uart_rx_one_char = 0x40000070);
PROVIDE(uart_rx_one_char_block = 0x40000074);
PROVIDE(uart_rx_readbuff = 0x40000078);
/*
PROVIDE(esprv_intc_int_set_priority = 0x400005e0);
PROVIDE(esprv_intc_int_set_threshold = 0x400005e4);
PROVIDE(esprv_intc_int_enable = 0x400005e8);
PROVIDE(esprv_intc_int_disable = 0x400005ec);
*/
esprv_intc_int_set_priority = 0x400005e0;
esprv_intc_int_set_threshold = 0x400005e4;
esprv_intc_int_enable = 0x400005e8;
esprv_intc_int_disable = 0x400005ec;
esprv_intc_int_set_type = 0x400005f0;
intr_matrix_set = 0x400005f4;
ets_intr_lock = 0x400005f8;
ets_intr_unlock = 0x400005fc;
PROVIDE(__divdi3 = 0x400007b4);