scoutos / prex-0.9.0 / bsp / hal / x86 / arch / kern.ld @ 03e9c04a
History | View | Annotate | Download (536 Bytes)
1 |
/* |
---|---|
2 |
* Linker script for kernel |
3 |
*/ |
4 |
INCLUDE config.ld |
5 |
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") |
6 |
OUTPUT_ARCH(i386) |
7 |
ENTRY(kernel_start) |
8 |
PHDRS |
9 |
{ |
10 |
text PT_LOAD FILEHDR PHDRS; |
11 |
data PT_LOAD; |
12 |
} |
13 |
SECTIONS |
14 |
{ |
15 |
. = CONFIG_KERNEL_TEXT + SIZEOF_HEADERS; |
16 |
|
17 |
.text : { |
18 |
*(.text) |
19 |
} : text = 0x9090 |
20 |
|
21 |
. = ALIGN(32); |
22 |
.rodata : { |
23 |
*(.rodata) |
24 |
*(.rodata.*) |
25 |
} : text |
26 |
|
27 |
. = ALIGN(32); |
28 |
.data : { |
29 |
*(.data) |
30 |
} : data |
31 |
|
32 |
__bss = .; |
33 |
.bss . : { |
34 |
*(.bss) |
35 |
*(COMMON) |
36 |
} |
37 |
. = ALIGN(32 / 8); |
38 |
__end = .; |
39 |
|
40 |
/DISCARD/ : { *(.comment .note) } |
41 |
} |