From 1f659c49c690780e3e99b2df29cd2e3613cbbf5b Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Sun, 14 Oct 2018 22:09:07 +0200 Subject: [PATCH] Fix multiboot header not coming first in the executable. The default linker script places .text.unlikely prior to .text. --- kernel/x64/boot.S | 5 ++--- kernel/x86/boot.S | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/kernel/x64/boot.S b/kernel/x64/boot.S index dc0cc5c4..c56db28c 100644 --- a/kernel/x64/boot.S +++ b/kernel/x64/boot.S @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2014, 2015, 2016 Jonas 'Sortie' Termansen. + * Copyright (c) 2011, 2014, 2015, 2016, 2018 Jonas 'Sortie' Termansen. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -18,8 +18,7 @@ * kernel main function. It also jumps into long mode! */ -.section .text -.text 0x100000 +.section .text.unlikely # Multiboot header. .align 4 diff --git a/kernel/x86/boot.S b/kernel/x86/boot.S index 456cdbc0..4f1a2ca4 100644 --- a/kernel/x86/boot.S +++ b/kernel/x86/boot.S @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2014, 2015, 2016 Jonas 'Sortie' Termansen. + * Copyright (c) 2011, 2014, 2015, 2016, 2018 Jonas 'Sortie' Termansen. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -18,8 +18,7 @@ * kernel main function. */ -.section .text -.text 0x100000 +.section .text.unlikely # Multiboot header. .align 4