-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.ldscript
58 lines (50 loc) · 1.14 KB
/
init.ldscript
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
OUTPUT_FORMAT("elf32-lm32")
ENTRY(_start)
__DYNAMIC = 0;
MEMORY {
sdram : ORIGIN = 0x10000000, LENGTH = 0x8000000
}
SECTIONS
{
.text 0x10000000 : AT ( 0x40000000 )
{
_ftext = .;
*(.text .stub .text.* .gnu.linkonce.t.*)
_etext = .;
} > sdram
.rodata ADDR(.text) + SIZEOF(.text) : AT ( LOADADDR(.text) + SIZEOF(.text) )
{
. = ALIGN(4);
_frodata = .;
*(.rodata .rodata.* .gnu.linkonce.r.*)
*(.rodata1)
_erodata = .;
} > sdram
/* We shouldn't have a .data section, however the GNU crapchain whines if we don't */
.data ADDR(.text) + SIZEOF(.text) : AT ( LOADADDR(.text) + SIZEOF(.text) )
{
. = ALIGN(4);
_fdata = .;
*(.data .data.* .gnu.linkonce.d.*)
*(.data1)
_gp = ALIGN(16);
*(.sdata .sdata.* .gnu.linkonce.s.*)
_edata = .;
} > sdram
.bss ADDR(.data) + SIZEOF(.data) : AT ( LOADADDR(.data) + SIZEOF(.data) )
{
. = ALIGN(4);
_fbss = .;
*(.dynsbss)
*(.sbss .sbss.* .gnu.linkonce.sb.*)
*(.scommon)
*(.dynbss)
*(.bss .bss.* .gnu.linkonce.b.*)
*(COMMON)
. = ALIGN(4);
_ebss = .;
_end = .;
} > sdram
}
PROVIDE(_phys_fdata = LOADADDR(.data));
PROVIDE(_fstack = ORIGIN(sdram) + LENGTH(sdram) - 4);