瀏覽代碼

Kernel: Simplify the linker script for the prekernel

Gunnar Beutner 4 年之前
父節點
當前提交
b6ddb4b70f
共有 2 個文件被更改,包括 4 次插入11 次删除
  1. 1 1
      Kernel/Prekernel/boot.S
  2. 3 10
      Kernel/Prekernel/linker.ld

+ 1 - 1
Kernel/Prekernel/boot.S

@@ -38,7 +38,7 @@ boot_pd_kernel_pts:
 boot_pd_kernel_pt1023:
 .skip 4096
 
-.section .boot_text, "ax"
+.section .text
 
 .global start
 .type start, @function

+ 3 - 10
Kernel/Prekernel/linker.ld

@@ -3,7 +3,6 @@ ENTRY(start)
 PHDRS
 {
   boot_text PT_LOAD ;
-  boot_bss PT_LOAD ;
   text PT_LOAD ;
   data PT_LOAD ;
   bss PT_LOAD ;
@@ -17,20 +16,12 @@ SECTIONS
 
     .boot_text ALIGN(4K) : AT (ADDR(.boot_text))
     {
-        KEEP(*(.boot_text))
         KEEP(*(.multiboot))
     } :boot_text
 
-    .boot_bss ALIGN(4K) (NOLOAD) : AT (ADDR(.boot_bss))
-    {
-        KEEP(*(.page_tables))
-        KEEP(*(.stack))
-        *(.super_pages)
-    } :boot_bss
-
     .text ALIGN(4K) : AT (ADDR(.text))
     {
-        start_of_kernel_text = .;
+        start_of_prekernel_text = .;
         *(.text*)
     } :text
 
@@ -48,6 +39,8 @@ SECTIONS
     {
         *(COMMON)
         *(.bss)
+        *(.stack)
+        *(.page_tables)
     } :bss
 
     end_of_prekernel_image = .;