-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnon_nusys_demo.ld
70 lines (60 loc) · 1.64 KB
/
non_nusys_demo.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
OUTPUT_ARCH (mips)
#define BEGIN_SEG(name, addr) \
_##name##SegmentStart = ADDR(.name); \
_##name##SegmentRomStart = __romPos; \
.name addr : AT(__romPos)
#define END_SEG(name) \
_##name##SegmentEnd = ADDR(.name) + SIZEOF(.name); \
_##name##SegmentRomEnd = __romPos + SIZEOF(.name); \
__romPos += SIZEOF(.name);
#define BEGIN_NOLOAD(name) \
_##name##SegmentBssStart = ADDR(.name.noload); \
.name.noload (NOLOAD) :
#define END_NOLOAD(name) \
_##name##SegmentBssEnd = ADDR(.name.noload) + SIZEOF(.name.noload); \
_##name##SegmentBssSize = SIZEOF(.name.noload);
SECTIONS
{
__romPos = 0;
BEGIN_SEG(boot, 0x04000000)
{
build/obj/rom_header.o(.text);
build/obj/boot.6102.o(.data);
}
END_SEG(boot)
BEGIN_SEG(code, 0x80000400) SUBALIGN(16)
{
/* text */
build/obj/entry.o(.text);
build/codesegment.o(.text);
/usr/lib/n64/PR/rspboot.o(.text);
/usr/lib/n64/PR/gspF3DEX2.fifo.o(.text);
/usr/lib/n64/PR/aspMain.o(.text);
/* data */
build/codesegment.o(.data*);
/usr/lib/n64/PR/rspboot.o(.data*);
/usr/lib/n64/PR/gspF3DEX2.fifo.o(.data*);
/usr/lib/n64/PR/aspMain.o(.data*);
/* rodata */
build/codesegment.o(.rodata*);
}
END_SEG(code)
BEGIN_NOLOAD(code)
{
build/codesegment.o(COMMON);
build/codesegment.o(.scommon*);
build/codesegment.o(.bss*);
. = ALIGN(0x8);
}
END_NOLOAD(code)
BEGIN_SEG(audio_data, __romPos)
{
build/obj/audio_data.o(.data);
}
END_SEG(audio_data)
/* Discard everything not specifically mentioned above. */
/DISCARD/ :
{
*(*);
}
}