From 51881853743ad380e78cc38883456d02c6c62da3 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 19 Jul 2021 18:52:01 +0200 Subject: [PATCH] Kernel: Rename .boot_bss to .super_pages to better reflect what it is This also removes the section attribute for kernel_base which had no effect because the section wasn't included in the linker script. --- Kernel/BootInfo.h | 2 +- Kernel/init.cpp | 2 +- Kernel/linker_amd64.ld | 6 +++--- Kernel/linker_i386.ld | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Kernel/BootInfo.h b/Kernel/BootInfo.h index 65d2e45918..f8c8fdd9d2 100644 --- a/Kernel/BootInfo.h +++ b/Kernel/BootInfo.h @@ -12,7 +12,7 @@ extern "C" PhysicalAddress start_of_prekernel_image; extern "C" PhysicalAddress end_of_prekernel_image; -extern "C" __attribute__((section(".boot_bss"))) FlatPtr kernel_base; +extern "C" FlatPtr kernel_base; #if ARCH(X86_64) extern "C" u32 gdt64ptr; extern "C" u16 code64_sel; diff --git a/Kernel/init.cpp b/Kernel/init.cpp index cc6a93b3ec..7b96f19eb8 100644 --- a/Kernel/init.cpp +++ b/Kernel/init.cpp @@ -109,7 +109,7 @@ static Processor s_bsp_processor; // global but let's keep it "private" extern "C" { PhysicalAddress start_of_prekernel_image; PhysicalAddress end_of_prekernel_image; -__attribute__((section(".boot_bss"))) FlatPtr kernel_base; +FlatPtr kernel_base; #if ARCH(X86_64) PhysicalAddress boot_pml4t; #endif diff --git a/Kernel/linker_amd64.ld b/Kernel/linker_amd64.ld index 08d0ae2fbc..c50c1be66c 100644 --- a/Kernel/linker_amd64.ld +++ b/Kernel/linker_amd64.ld @@ -4,7 +4,7 @@ KERNEL_VIRTUAL_BASE = 0x2000000000; PHDRS { - boot_bss PT_LOAD ; + super_pages PT_LOAD ; text PT_LOAD ; data PT_LOAD ; bss PT_LOAD ; @@ -17,10 +17,10 @@ SECTIONS start_of_kernel_image = .; - .boot_bss ALIGN(4K) (NOLOAD) : AT (ADDR(.boot_bss) - KERNEL_VIRTUAL_BASE) + .super_pages ALIGN(4K) (NOLOAD) : AT (ADDR(.super_pages) - KERNEL_VIRTUAL_BASE) { *(.super_pages) - } :boot_bss + } :super_pages .text ALIGN(4K) : AT (ADDR(.text) - KERNEL_VIRTUAL_BASE) { diff --git a/Kernel/linker_i386.ld b/Kernel/linker_i386.ld index 6818845840..0c967f30e0 100644 --- a/Kernel/linker_i386.ld +++ b/Kernel/linker_i386.ld @@ -4,7 +4,7 @@ KERNEL_VIRTUAL_BASE = 0xc0000000; PHDRS { - boot_bss PT_LOAD ; + super_pages PT_LOAD ; text PT_LOAD ; data PT_LOAD ; bss PT_LOAD ; @@ -17,10 +17,10 @@ SECTIONS start_of_kernel_image = .; - .boot_bss ALIGN(4K) (NOLOAD) : AT (ADDR(.boot_bss) - KERNEL_VIRTUAL_BASE) + .super_pages ALIGN(4K) (NOLOAD) : AT (ADDR(.super_pages) - KERNEL_VIRTUAL_BASE) { *(.super_pages) - } :boot_bss + } :super_pages .text ALIGN(4K) : AT (ADDR(.text) - KERNEL_VIRTUAL_BASE) {