Repos / kernel.git / commitdiff
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2f8ec18)
raw | patch | inline | side by side (parent: 2f8ec18)
| author | zhaoyanbai <zhaoyanbai@126.com> | |
| Mon, 1 Nov 2021 04:09:42 +0000 (12:09 +0800) | ||
| committer | zhaoyanbai <zhaoyanbai@126.com> | |
| Wed, 3 Nov 2021 02:45:45 +0000 (10:45 +0800) |
| boot/multiboot.S | patch | blob | history | |
| scripts/link.ld | patch | blob | history |
diff --git a/boot/multiboot.S b/boot/multiboot.S
--- a/boot/multiboot.S
+++ b/boot/multiboot.S
.extern root_task
.extern root_task_entry
-.section .multiboot_header
-.align 32
- # Multiboot Header
- # Align 32 bits boundary
- .align 4
- # Magic
- .long MULTIBOOT_HEADER_MAGIC
- # Flags
- .long MULTIBOOT_HEADER_FLAGS
- # Checksum
- .long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
.text
.code32
GDTRBase: .long BootGDT-KRNLADDR
.comm stack, MULTIBOOT_STACK_SIZE
+
+
+
+.section .multiboot_header
+.align 32
+ # Multiboot Header
+ # Align 32 bits boundary
+ .align 4
+ # Magic
+ .long MULTIBOOT_HEADER_MAGIC
+ # Flags
+ .long MULTIBOOT_HEADER_FLAGS
+ # Checksum
+ .long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
\ No newline at end of file
diff --git a/scripts/link.ld b/scripts/link.ld
--- a/scripts/link.ld
+++ b/scripts/link.ld
{
code = .;
phys_addr = . - kernel_virtual_addr_start;
+ boot/multiboot.S.o(.text)
*(.multiboot_header)
*(.text)