-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlink.x
36 lines (30 loc) · 869 Bytes
/
link.x
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
PATH_SIZE = 1024;
PARAMS_SIZE = 256;
STACK_SIZE = 1024*64;
SECTIONS {
hdr : {
LONG(0x554e454D);
LONG(0x31305445);
LONG(1); // Header version
LONG(kol_main); // Program start
LONG(END); // Image size
LONG(FILE_END + PATH_SIZE + PARAMS_SIZE + STACK_SIZE); // Required amount of memory
LONG(FILE_END + PATH_SIZE + PARAMS_SIZE + STACK_SIZE); // Stack
LONG(FILE_END + PATH_SIZE); // Boot params
LONG(FILE_END); // Application path
}
.text : {
*(.text)
*(.text.*)
}
END = .;
.data ALIGN(16) : {
*(.rodata.*)
*(const)
*(CONST)
*(.data)
*(data)
}
.bss ALIGN(16) : {*(.bss)}
FILE_END = .;
}