aboutsummaryrefslogtreecommitdiff
path: root/linker.ld
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2021-02-03 23:39:03 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2021-02-03 23:39:43 +0200
commit039df4c04d83fc26ca60d4f870d2e58d381818ad (patch)
tree0896053cffebfe97ac98c98386d62ef7f2e980b1 /linker.ld
parentUpdate readme with required packages (diff)
downloadkernel.cpp-039df4c04d83fc26ca60d4f870d2e58d381818ad.tar.xz
Rewrite boot.s to use clang instead of nasm
Diffstat (limited to 'linker.ld')
-rw-r--r--linker.ld13
1 files changed, 5 insertions, 8 deletions
diff --git a/linker.ld b/linker.ld
index 7e07efc..a0bb74f 100644
--- a/linker.ld
+++ b/linker.ld
@@ -1,9 +1,8 @@
-/* The bootloader will look at this image and start execution at the symbol
- designated as the entry point. */
ENTRY(_start)
OUTPUT_FORMAT(elf32-i386)
-OUTPUT_ARCH(i386:i386)
-
+
+SEARCH_DIR(libk)
+
/* Tell where the various sections of the object files will be put in the final
kernel image. */
SECTIONS
@@ -15,12 +14,9 @@ SECTIONS
/* First put the multiboot header, as it is required to be put very early
early in the image or the bootloader won't recognize the file format.
Next we'll put the .text section. */
- .boot :
- {
- *(.multiboot)
- }
.text :
{
+ *(.multiboot)
*(.text)
}
@@ -41,6 +37,7 @@ SECTIONS
{
*(COMMON)
*(.bss)
+ *(.stack)
}
/* The compiler may produce other sections, by default it will put them in