diff options
Diffstat (limited to 'defs')
| -rw-r--r-- | defs/x86_64-linker.ld | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/defs/x86_64-linker.ld b/defs/x86_64-linker.ld index 3d54187..1f53bf8 100644 --- a/defs/x86_64-linker.ld +++ b/defs/x86_64-linker.ld @@ -1,8 +1,30 @@ +/* defs for Multiboot headers */ +MB_MAGIC = 0x1badb002; +MB_FLAGS = 0x3; +MB_CHKSUM = 0x100000000 - (MB_MAGIC + MB_FLAGS); + SECTIONS { - PROVIDE (___KERNEL_START__ = .); . = 0x100000; /* system's start address */ + .boot : + { + header_start = .; LONG(MB_MAGIC) + LONG(MB_FLAGS) + LONG(MB_CHKSUM) + LONG(0) + LONG(0) + LONG(0) + LONG(0) + LONG(0) + LONG(0) + LONG(0) + LONG(0) + LONG(0) + header_end = .; + } + + PROVIDE (___KERNEL_START__ = .); .text : { *(".text") |
