-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharpatch.ld
51 lines (43 loc) · 1.06 KB
/
arpatch.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
OUTPUT_FORMAT("elf32-sh", "elf32-sh",
"elf32-sh")
OUTPUT_ARCH(sh)
ENTRY(_start)
MEMORY {
cart_trampoline (rx) : org = 0x02000f00, l = 0x40
cart_main (rx) : org = 0x020160a0, l = 0x20000 - 0x160a0
/* stay above the Satiator's load region, and below the AR's */
work_low (rwx) : org = 0x220000, l = 0x0e0000
}
SECTIONS {
.trampoline : {
KEEP(out/trampoline.o)
} >cart_trampoline
.cart_header : {
/* header must be aligned to 0x100 */
. = ALIGN(0x100);
KEEP(*(.header))
*(.text);
*(.text.*);
*(.rodata);
*(.rodata.*);
. = ALIGN(4);
__load_from = .;
} >cart_main
.ram : AT(__load_from) {
__load_start = .;
*(.data);
*(.data.*);
. = ALIGN(4);
__load_end = .;
*(.bss);
*(.bss.*);
*(COMMON);
__bss_end = .;
. = ALIGN(4);
__free_ram_begin = .;
__free_ram_end = __load_start + 0x100000;
} >work_low
.free : {
__free_flash_begin = .;
} >cart_main
}