aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/linker.ld
diff options
context:
space:
mode:
authorMarvin Borner2019-09-26 22:58:06 +0200
committerMarvin Borner2019-09-26 22:58:06 +0200
commit1d3ff04f2dd47c71aa0b2d7e7601f0d31b3eab60 (patch)
tree84b51246358d8c93f50ac677c598d9da98fd56eb /src/kernel/linker.ld
parent181947c70d7a6c5ff769243885d76f3af39560ce (diff)
Added higher half kernel with paging
Diffstat (limited to 'src/kernel/linker.ld')
-rw-r--r--src/kernel/linker.ld47
1 files changed, 23 insertions, 24 deletions
diff --git a/src/kernel/linker.ld b/src/kernel/linker.ld
index 6461b2b..3e209fc 100644
--- a/src/kernel/linker.ld
+++ b/src/kernel/linker.ld
@@ -1,25 +1,24 @@
-OUTPUT_FORMAT("binary")
ENTRY(start)
-phys = 0x00100000;
-SECTIONS
-{
- .text phys : AT(phys) {
- code = .;
- *(.text)
- *(.rodata*)
- . = ALIGN(4096);
- }
- .data : AT(phys + (data - code))
- {
- data = .;
- *(.data)
- . = ALIGN(4096);
- }
- .bss : AT(phys + (bss - code))
- {
- bss = .;
- *(.bss)
- . = ALIGN(4096);
- }
- end = .;
-}
+OUTPUT_FORMAT(elf32-i386)
+
+SECTIONS {
+ . = 0xC0100000;
+
+ .text : AT(ADDR(.text) - 0xC0000000) {
+ *(.text)
+ *(.rodata*)
+ }
+
+ .data ALIGN (0x1000) : AT(ADDR(.data) - 0xC0000000) {
+ *(.data)
+ }
+
+ .bss : AT(ADDR(.bss) - 0xC0000000) {
+ _sbss = .;
+ *(COMMON)
+ *(.bss)
+ _ebss = .;
+ }
+
+ end = .;
+} \ No newline at end of file