-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlink.ld
51 lines (43 loc) · 900 Bytes
/
link.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
INPUT
(
kernel/kernel_entry.o
kernel/kernel.o
interrupt/idt.o
kernel/devmgr_entry.o
kernel/devmgr.o
pci/pci.o
scheduler/timer_entry.o
memory/memory.o
memory/memory_asm.o
)
OUTPUT_FORMAT("binary")
OUTPUT(kernel.bin)
SECTIONS
{
. = 0x8000;
.kernel : {
kernel/kernel_entry.o( .text )
kernel/misc.o( .text )
kernel/kernel.o( .text )
memory/memory.o( .text )
memory/memory_asm.o( .text )
interrupt/idt.o( .text )
kernel/devmgr_entry.o( .text )
kernel/devmgr.o( .text )
scheduler/timer_entry.o( .text )
displaydriver/displaydriver.o( .text )
pci/pci.o( .text )
}
. = 0xa000;
.memorydata : {
memory/memory.o( .data )
interrupt/idt.o( .data )
interrupt/idt.o( .rodata )
}
. = 0xb000;
.kerneldata : {
kernel/kernel.o( .data )
kernel/kernel.o( .rodata )
kernel/devmgr.o( .data )
}
}