From 75f0977e41004511bd475ee75a24fd04db4ddc39 Mon Sep 17 00:00:00 2001 From: Miguel Date: Tue, 11 Sep 2018 00:33:28 +0200 Subject: little cleanup vmem, parse kernel section headers --- fs/elf.c | 19 +++++++++++++++++++ fs/elf.h | 2 ++ 2 files changed, 21 insertions(+) (limited to 'fs') diff --git a/fs/elf.c b/fs/elf.c index bca527a..b4bc9d1 100644 --- a/fs/elf.c +++ b/fs/elf.c @@ -65,6 +65,25 @@ typedef struct { } Elf32_Phdr; +void elf_multiboot_read(multiboot_information *info) +{ + uint32_t num=info->syms[0]; + uint32_t addr=info->syms[2]; + uint32_t stridx=info->syms[3]; + + klog("ELF Kernel Sections:"); + // iterate over section headers. + Elf32_Shdr *shdr=addr; + for(int i=0;i