diff options
Diffstat (limited to 'defs/x86_64-hm-linker.ld')
| -rw-r--r-- | defs/x86_64-hm-linker.ld | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/defs/x86_64-hm-linker.ld b/defs/x86_64-hm-linker.ld index fab0699..2055ce4 100644 --- a/defs/x86_64-hm-linker.ld +++ b/defs/x86_64-hm-linker.ld @@ -1,11 +1,11 @@ /* defs for Multiboot headers */ /* https://www.gnu.org/software/grub/manual/multiboot/multiboot.txt */ -MB_MAGIC = 0x1badb002; -/* bit 0 - * all boot modules loaded along with the operating system must be - * aligned on page (4KB) bit 1 must include mem_* structures +/* bit 0: all boot modules loaded along with the operating system must + * be aligned on page (4KB) + * bit 1: must include mem_* structures */ +MB_MAGIC = 0x1badb002; MB_FLAGS = 0x3; MB_CHKSUM = 0x100000000 - (MB_MAGIC + MB_FLAGS); @@ -50,7 +50,6 @@ SECTIONS *(".reserved_0.*") } - /* global page table for 64-bit long mode */ .global_pagetable ALIGN(4096) (NOLOAD) : { @@ -76,6 +75,9 @@ SECTIONS } . = . + KERNEL_OFFSET; + + /* .ltext, .ldata, .lbss, .rodata etc are generated by rust compiler */ + /* because of "code-model=large setting" */ .text : AT(ADDR(.text) - KERNEL_OFFSET) { *(".text") @@ -100,8 +102,8 @@ SECTIONS { PROVIDE (___BSS_START__ = .); *(".bss") - *(".lbss") *(".bss.*") + *(".lbss") *(".lbss.*") *(".lbss$") PROVIDE (___BSS_END__ = .); |
