-
Notifications
You must be signed in to change notification settings - Fork 0
/
3dst.ld
103 lines (89 loc) · 1.86 KB
/
3dst.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
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
/*--------------------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can
obtain one at https://mozilla.org/MPL/2.0/.
--------------------------------------------------------------------------------*/
/* Adapted from the original NTR 3ds.ld and devkitPro's 3dsx.ld */
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
ENTRY(_Reset)
PHDRS
{
code PT_LOAD FLAGS(5) /* Read | Execute */;
rodata PT_LOAD FLAGS(4) /* Read */;
data PT_LOAD FLAGS(6) /* Read | Write */;
}
SECTIONS
{
. = 0x00100100;
. = ALIGN(4);
.text : {
obj/bootloader.o (.text*)
*(.text*)
} : code
. = ALIGN(4);
.rodata : {
*(.rodata)
*(.roda)
*(.rodata.*)
*all.rodata*(*)
. = ALIGN(4);
__tdata_align = .;
LONG (ALIGNOF(.tdata));
. = ALIGN(4);
} : rodata
. = ALIGN(4);
.rel.dyn : {
__rel_dyn_start = .;
*(.rel)
*(.rel.*)
__rel_dyn_end = .;
} : rodata
/*
.ARM.exidx :
{
PROVIDE_HIDDEN (__exidx_start = .);
*(.ARM.exidx*)
PROVIDE_HIDDEN (__exidx_end = .);
}
*/
. = ALIGN(4); .dynamic : { *(.dynamic) } : data
. = ALIGN(4); .got : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) } : data
. = ALIGN(4);
.data : {
*(.data)
*(.data.*)
} : data
. = ALIGN(4);
.tdata : {
__tdata_lma = .;
*(.tdata)
*(.tdata.*)
. = ALIGN(4);
__tdata_lma_end = .;
} : data
. = ALIGN(4);
.tbss : {
*(.tbss)
*(.tbss.*)
*(.tcommon)
. = ALIGN(4);
} : data
. = ALIGN(4);
.bss : {
*(.__bss_start)
*(.dynbss)
*(.bss)
*(.bss.*)
*(COMMON)
. = 8 + ABSOLUTE(ALIGN(ABSOLUTE(. - 8), ALIGNOF(.tdata)));
__tls_start = .;
. += SIZEOF(.tdata);
. = ALIGN(ALIGNOF(.tbss));
. += SIZEOF(.tbss);
__tls_end = .;
*(.__bss_end)
} : data
. = ALIGN(4);
__end__ = .;
}