-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinker.ld
30 lines (25 loc) · 889 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
/* Entry Section for the final bin file */
ENTRY(_start)
OUTPUT_FORMAT(elf32-i386) /* ELF32 binary, 32 bit */
OUTPUT_ARCH(i386:i386) /* 32 bit architecture machine code neeeded*/
SECTIONS
{
. = 1M; /* Align the kernel code at 1M location */
.text : /* Text section has multiboot and actual code sections */
{
*(.multiboot)
*(.text)
}
.rodata : /* Any Read only data declared here, constants etc */
{
*(.rodata)
}
.data : /* Read and write data declared here */
{
*(.data)
}
.bss : /* Reserved but uninitialised data here, stack is declared here too */
{
*(.bss)
}
}