summaryrefslogtreecommitdiff
path: root/ld_script.txt
blob: 5651e63673fb79630119b875980f9f592166f1b5 (plain)
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
SECTIONS
{
    /* start of ewram */
    . = 0x02000000;
    ewram (NOLOAD) :
    ALIGN(4)
    {
<EWRAM>
        /* COMMON starts at ??? */
<COMMON>
    }

    /* start of iwram */
    . = 0x03000000;
    iwram (NOLOAD) :
    ALIGN(4)
    {
        /* .bss starts at 0x3000000 */
<BSS>
        . = 0x7400;
        /* .bss.code starts at 0x3007400 */
        src/m4a.o(.bss.code);

        . = 0x8000;
    }

    /* start of ROM */
    . = 0x08000000;
    .text :
    {
        asm/crt0.o(.text);
        src/util.o(.text);
        src/rom_850.o(.text);
        src/main.o(.text);
        src/gbplayer.o(.text);
        asm/rom_9BC.o(.text);
        src/bonus_field_select.o(.text);
        asm/ereader.o(.text);
        asm/pokedex.o(.text);
        src/field_select.o(.text);
        asm/intro.o(.text);
        asm/high_scores.o(.text);
        src/rom_1068C.o(.text);
        src/titlescreen.o(.text);
        asm/rom_11B9C.o(.text);
        src/rom_3219C.o(.text);
        asm/rom_3219C.o(.text);
        src/options.o(.text);
        src/rom_528AC.o(.text);
        asm/m4a_1.o(.text);
        src/m4a.o(.text);
        asm/libagbsyscall.o(.text);
        src/agb_sram.o(.text);
        *libgcc.a:_call_via_rX.o(.text);
        *libgcc.a:_divsi3.o(.text);
        *libgcc.a:_dvmd_tls.o(.text);
        *libgcc.a:_modsi3.o(.text);
        *libgcc.a:_udivsi3.o(.text);
        *libgcc.a:_umodsi3.o(.text);
        *libc.a:memcpy.o(.text);
        *libc.a:memset.o(.text);
        *libc.a:strlen.o(.text);
    }=0

    .rodata :
    {
        data/rom.o(.rodata)
    }=0xFF

    /* Discard everything not specifically mentioned above. */
    /DISCARD/ :
    {
        *(*);
    }
}

/* m4a parameters */
gMaxLines = 0x3C;
gNumMusicPlayers = 0x4;