From 38d9f87c5086ca132fea43912d6f6ad777c2c852 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Thu, 30 Jun 2022 17:27:48 +0200 Subject: kernel/linker: rename .text.early to .shared It's not really just a text section, as it's writeable too. Makes gcc shut up about invalid section attributes. --- src/kernel/arch/i386/gdt/gdt.c | 4 ++-- src/kernel/arch/i386/interrupts/idt.c | 2 +- src/kernel/arch/i386/interrupts/isr_stub.s | 2 +- src/kernel/arch/i386/sysenter.s | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/kernel/arch') diff --git a/src/kernel/arch/i386/gdt/gdt.c b/src/kernel/arch/i386/gdt/gdt.c index 3662bf6..3521052 100644 --- a/src/kernel/arch/i386/gdt/gdt.c +++ b/src/kernel/arch/i386/gdt/gdt.c @@ -38,9 +38,9 @@ struct lgdt_arg { uint32_t base; } __attribute__((packed)); -__attribute__((section(".text.early"))) +__attribute__((section(".shared"))) static struct gdt_entry GDT[SEG_end]; -__attribute__((section(".text.early"))) +__attribute__((section(".shared"))) static struct tss_entry TSS; static struct lgdt_arg lgdt_arg; // probably doesn't need to be global diff --git a/src/kernel/arch/i386/interrupts/idt.c b/src/kernel/arch/i386/interrupts/idt.c index d295d84..cd2adfd 100644 --- a/src/kernel/arch/i386/interrupts/idt.c +++ b/src/kernel/arch/i386/interrupts/idt.c @@ -23,7 +23,7 @@ struct lidt_arg { uint32_t base; } __attribute__((packed)); -__attribute__((section(".text.early"))) +__attribute__((section(".shared"))) static struct idt_entry IDT[256]; static struct lidt_arg lidt_arg; diff --git a/src/kernel/arch/i386/interrupts/isr_stub.s b/src/kernel/arch/i386/interrupts/isr_stub.s index c09d4b2..42f2aa6 100644 --- a/src/kernel/arch/i386/interrupts/isr_stub.s +++ b/src/kernel/arch/i386/interrupts/isr_stub.s @@ -1,4 +1,4 @@ -.section .text.early +.section .shared .global _isr_stubs _isr_stubs: diff --git a/src/kernel/arch/i386/sysenter.s b/src/kernel/arch/i386/sysenter.s index 70e9f13..edfabf0 100644 --- a/src/kernel/arch/i386/sysenter.s +++ b/src/kernel/arch/i386/sysenter.s @@ -28,7 +28,7 @@ sysenter_setup: ret -.section .text.early +.section .shared .global stored_eax stored_eax: -- cgit v1.2.3