summaryrefslogtreecommitdiff
path: root/berry_fix/payload/ld_script.txt
blob: d0a0af9edb5cdd50fbc4d7ada186d4ade237abce (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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
ENTRY(Init)

SECTIONS {
	. = 0x2010000;

	.text :
	ALIGN(4)
	{
		asm/crt0.o(.text);
		src/main.o(.text);
		src/rtc.o(.text);
		src/flash.o(.text);
	} =0

	lib_text :
	ALIGN(4)
	{
		src/agb_flash.o(.text);
		src/agb_flash_1m.o(.text);
		src/agb_flash_mx.o(.text);
        asm/libagbsyscall.o(.text);
		src/siirtc.o(.text);
        *libgcc.a:_call_via_rX.o(.text);
        *libgcc.a:_modsi3.o(.text);
        *libgcc.a:_umodsi3.o(.text);
        *libgcc.a:_dvmd_tls.o(.text);
	} =0

	.rodata :
	ALIGN(4)
	{
	    src/main.o(.rodata);
	    src/rtc.o(.rodata);
	    src/flash.o(.rodata);
	} =0

	lib_rodata :
	ALIGN(4)
	{
        src/agb_flash.o(.rodata);
        src/agb_flash_1m.o(.rodata);
        src/agb_flash_mx.o(.rodata);
        src/agb_flash_le.o(.rodata);
        src/siirtc.o(.rodata);
	}

	. = 0x2020000;

	ewram (NOLOAD) :
	ALIGN(4)
	{
<EWRAM>
	}

	. = 0x3001000;

	iwram (NOLOAD) :
	ALIGN(4)
	{
<BSS>
    . = 0x40;
<COMMON>
		end = .;
	}

	. = 0x8000000;

	RS_Rom (NOLOAD) :
	ALIGN(4)
	{
		_start = .;
		. += 4;
		RomHeaderNintendoLogo = .;
		. += 156;
		RS_RomHeader = .;
        RomHeaderGameTitle = .;
        . += 12;
        RomHeaderGameCode = .;
        . += 4;
        RomHeaderMakerCode = .;
        . += 2;
        RomHeaderMagic = .;
        . += 1;
        RomHeaderMainUnitCode = .;
        . += 1;
        RomHeaderDeviceType = .;
        . += 1;
        RomHeaderReserved1 = .;
        . += 7;
        RomHeaderSoftwareVersion = .;
        . += 1;
        RomHeaderChecksum = .;
        . += 1;
        RomHeaderReserved2 = .;
        . += 6;
        GPIOPortData = .;
        . += 2;
        GPIOPortDirection = .;
        . += 2;
        GPIOPortReadEnable = .;
	} =0

	/DISCARD/ :
	{
		*(*);
	}
}