From 4cc058ab42fca51159f0d1cda4197d5e9bd9066a Mon Sep 17 00:00:00 2001 From: EnderIce2 Date: Thu, 27 Mar 2025 02:09:00 +0000 Subject: [PATCH] feat(kernel/elf): add OS-specific segment types and GNU properties Signed-off-by: EnderIce2 --- Fennix Kernel.code-workspace | 3 ++- Kernel/include/elf.h | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Fennix Kernel.code-workspace b/Fennix Kernel.code-workspace index db2b6dd4..bc01b8cc 100644 --- a/Fennix Kernel.code-workspace +++ b/Fennix Kernel.code-workspace @@ -34,7 +34,8 @@ "kernel", "kernel/pci", "kernel/driver", - "kernel/drivers" + "kernel/drivers", + "kernel/elf" ] } } diff --git a/Kernel/include/elf.h b/Kernel/include/elf.h index b63f9dda..0ad2fe09 100644 --- a/Kernel/include/elf.h +++ b/Kernel/include/elf.h @@ -241,8 +241,14 @@ enum SegmentTypes PT_SHLIB = 5, PT_PHDR = 6, PT_TLS = 7, + PT_LOOS = 0x60000000, /* OS-specific */ + PT_HIOS = 0x6fffffff, /* OS-specific */ PT_LOPROC = 0x70000000, PT_HIPROC = 0x7fffffff, + PT_GNU_EH_FRAME = (PT_LOOS + 0x474e550), + PT_GNU_STACK = (PT_LOOS + 0x474e551), + PT_GNU_RELRO = (PT_LOOS + 0x474e552), + PT_GNU_PROPERTY = (PT_LOOS + 0x474e553) }; enum DynamicArrayTags