-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcommon.ld
90 lines (76 loc) · 1.59 KB
/
common.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
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm)
PROVIDE(_rom_start = ORIGIN(rom));
PROVIDE(_rom_size = LENGTH(rom));
PROVIDE(_ram_start = ORIGIN(ram));
PROVIDE(_ram_size = LENGTH(ram));
PROVIDE(_ram_end = ORIGIN(ram) + LENGTH(ram));
PROVIDE(_vector_size = 0x200); /* The minimum alignment is 128 words. */
PROVIDE(_bootopt_offset = _app_offset - _sector_size);
PROVIDE(_app_offset = 0x5000); /* 20480 */
PROVIDE(_bootopt = _rom_start + _bootopt_offset);
PROVIDE(_app = _rom_start + _app_offset);
SECTIONS
{
.text :
{
*(.vector)
. = _vector_size;
LONG(0); /* null sentinel */
*(.text)
*(.text.*)
. = ALIGN(4);
*(.rodata)
*(.rodata.*)
_etext = .;
} > rom
.data :
{
. = ALIGN(4);
_data = .;
*(.data .data.*)
*(.iap)
. = ALIGN(4);
_edata = .;
} > ram AT > rom
.bss (NOLOAD) :
{
. = ALIGN(4);
_bss = .;
*(.bss .bss.*)
*(COMMON)
. = ALIGN(4);
_ebss = .;
} > ram AT > rom
.keys _rom_start + _bootopt_offset - 16 - 64 :
{
_aeskey = .;
LONG(0x933ADA7F);
LONG(0x485F0153);
LONG(0x874F637C);
LONG(0x520202A2);
_pubkey = .;
LONG(0x6CC0085F);
LONG(0x6A1E9B21);
LONG(0xEEFCB6FB);
LONG(0x17B8ECEC);
LONG(0x3BBF86F1);
LONG(0x403DDBC9);
LONG(0xE501F3BE);
LONG(0x922F342D);
LONG(0x7D7A84F3);
LONG(0x707434ED);
LONG(0x4FB7D4D0);
LONG(0x7BB8F21F);
LONG(0xAA135FE1);
LONG(0xB9DED991);
LONG(0x165A04D0);
LONG(0xA740506E);
} > rom
.bootopt _rom_start + _bootopt_offset :
{
LONG(_rom_start + _app_offset); /* ADDR */
LONG(0xffffffff); /* LEN */
LONG(0xffffffff); /* HASH */
} > rom
}