From e90b72ec3082588b296956730bd2930cf8d5d671 Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Fri, 10 Jul 2026 11:31:46 +0800 Subject: refactor: promote new architecture to repository root Archive the deprecated implementation under lume-legacy, make the new kernel the default root-level build, and update repository entry points without changing kernel behavior. --- include/kernel/elf.h | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 include/kernel/elf.h (limited to 'include/kernel/elf.h') diff --git a/include/kernel/elf.h b/include/kernel/elf.h deleted file mode 100644 index 30193d2..0000000 --- a/include/kernel/elf.h +++ /dev/null @@ -1,51 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* - * Copyright (C) 2026 Richard QIn - */ - -#pragma once -#include "common/types.h" - -#define ELF_MAGIC 0x464C457F // "\x7FELF" in little endian - -// ELF File Header -struct elfhdr -{ - uint32 magic; // Must equal ELF_MAGIC - uint8 elf[12]; - uint16 type; - uint16 machine; - uint32 version; - uint64 entry; // Program Entry Point (Virtual Address) - uint64 phoff; // File offset of the Program Header Table - uint64 shoff; - uint32 flags; - uint16 ehsize; - uint16 phentsize; - uint16 phnum; // Number of Program Headers - uint16 shentsize; - uint16 shnum; - uint16 shstrndx; -}; - -// Program Header -// Describes how to load segments from a file into memory -struct proghdr -{ - uint32 type; - uint32 flags; - uint64 off; // Offset of the section in the file - uint64 vaddr; // Virtual address of the segment in memory - uint64 paddr; - uint64 filesz; // Size of the section in the file - uint64 memsz; // The size of the segment in memory (memsz >= filesz) - uint64 align; -}; - -// Values for Proghdr type -#define ELF_PROG_LOAD 1 - -// Flag bits for Proghdr flags -#define ELF_PROG_FLAG_EXEC 1 -#define ELF_PROG_FLAG_WRITE 2 -#define ELF_PROG_FLAG_READ 4 \ No newline at end of file -- cgit v1.2.3