mirror of
https://github.com/Tom-on64/kern.git
synced 2026-11-03 18:22:22 +00:00
Began rewrite
This commit is contained in:
+13
-34
@@ -1,52 +1,31 @@
|
||||
OUTPUT_FORMAT(binary)
|
||||
ENTRY(start)
|
||||
OUTPUT_FORMAT("elf32-i386")
|
||||
ENTRY(_start)
|
||||
|
||||
SECTIONS {
|
||||
. = 0x00100000;
|
||||
kernel_start = .;
|
||||
/* 1MB is a conventional place for kernels */
|
||||
. = 1M;
|
||||
|
||||
/* Multiboot Header */
|
||||
.multiboot ALIGN(4K) : {
|
||||
/* We need the multiboot header in the first 8192 bytes */
|
||||
.text BLOCK(4K) : ALIGN(4K) {
|
||||
*(.multiboot)
|
||||
}
|
||||
|
||||
.boot ALIGN(4K) : {
|
||||
*(.boot)
|
||||
}
|
||||
|
||||
. += 0xC000000;
|
||||
|
||||
/* Kernel Code */
|
||||
.text ALIGN(4) : AT(ADDR(.text) - 0xC000000) {
|
||||
*(.text)
|
||||
*(.text.*)
|
||||
}
|
||||
|
||||
/* Read-Only Data */
|
||||
.rodata ALIGN(4) : AT(ADDR(.rodata) - 0xC000000) {
|
||||
/* Read-only data */
|
||||
.rodata BLOCK(4K) : ALIGN(4K) {
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
}
|
||||
|
||||
/* Read/Write Data */
|
||||
.data ALIGN(4) : AT(ADDR(.data) - 0xC000000) {
|
||||
/* Initalized r/w data */
|
||||
.data BLOCK(4K) : ALIGN(4K) {
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
}
|
||||
|
||||
/* BSS Section */
|
||||
.bss ALIGN(4) : AT(ADDR(.bss) - 0xC000000) {
|
||||
/* Uninitialized r/w data and stack */
|
||||
.bss BLOCK(4K) : ALIGN(4K) {
|
||||
*(COMMON)
|
||||
*(.bss)
|
||||
*(.bss.*)
|
||||
}
|
||||
|
||||
/* Discarded Sections */
|
||||
/DISCARD/ : {
|
||||
*(.note)
|
||||
*(.note.*)
|
||||
*(.comment)
|
||||
}
|
||||
|
||||
kernel_end = .;
|
||||
. = 4M;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user