-
Notifications
You must be signed in to change notification settings - Fork 1
/
ld_script_modern.ld
64 lines (57 loc) · 1.18 KB
/
ld_script_modern.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
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm)
MEMORY {
ewram : ORIGIN = 0x02000000, LENGTH = 4M - 4k
iwram : ORIGIN = 0x03000000, LENGTH = 32k
rom : ORIGIN = (0x08000000), LENGTH = 32M
}
gMaxLines = 0;
gNumMusicPlayers = 15;
SECTIONS {
. = 0x2000000;
ewram (NOLOAD) :
ALIGN(4)
{
src/ewram.o(ewram_data);
} >ewram = 0x00
. = 0x3000000;
iwram (NOLOAD) :
ALIGN(4)
{
src/libs/m4a.o(.bss.code);
src/iwram.o(iwram_data);
} >iwram = 0x00
. = 0x8000000;
.text :
ALIGN(4)
{
asm/rom_header.o (.text*);
asm/crt0.o (.text);
src/sprite2.o (.text);
src/sprite2.o (.rodata);
src/sprite2.o (.data);
src/mmbn4.o (.rodata);
src/mmbn4.o (.text);
src/main.o (.text);
/* INCLUDE "linker/text.txt" */
*(.text*);
} >rom = 0x00
.data :
ALIGN(4)
{
*(.data*);
} >rom = 0x00
.rodata :
ALIGN(4)
{
/* INCLUDE "linker/rodata.txt" */
*(.rodata*);
INCLUDE "linker/rodata_sprite.txt"
INCLUDE "linker/rodata_tileset.txt"
} >rom = 0x00
/* Discard everything not specifically mentioned above. */
/DISCARD/ :
{
*(*);
}
}