-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlinker.ld
62 lines (56 loc) · 936 Bytes
/
linker.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
OUTPUT_FORMAT(elf32-i386)
ENTRY (loader)
phys = 0x00100000;
SECTIONS {
.text phys : AT(phys) {
code = .; _code = .; __code = .;
*(.text)
*(.rodata)
. = ALIGN(4096);
}
.data : AT(phys + (data - code)) {
data = .; _data = .; __data = .;
*(.data)
. = ALIGN(4096);
}
.bss : AT(phys + (bss - code)) {
bss = .; _bss = .; __bss = .;
*(.bss)
. = ALIGN(4096);
}
end = .; _end = .; __end = .;
/DISCARD/ : {
*(.comment)
*(.eh_frame)
*(.note.gnu.build-id)
}
}
/*
*SECTIONS
*{
* . = 0x00100000;
*
* .text ALIGN (0x1000) :
* {
* *(.text)
* }
*
* .rodata ALIGN (0x1000) :
* {
* *(.rodata*)
* }
*
* .data ALIGN (0x1000) :
* {
* *(.data)
* }
*
* .bss :
* {
* sbss = .;
* *(COMMON)
* *(.bss)
* ebss = .;
* }
*}
**/