Luna/kernel/include/sys/elf/ELFLoader.h
apio 3ac9fed23a ELFLoader: Add check_elf_image() and check_elf_image_from_filesystem()
These two functions validate an image, without actually loading it. Very useful for exec!
2022-10-12 18:37:00 +02:00

13 lines
430 B
C++

#pragma once
#include "fs/VFS.h"
#include "sys/elf/Image.h"
#include <stdint.h>
namespace ELFLoader
{
ELFImage* load_elf_from_vfs(VFS::Node* node); // This function assumes check_elf_image has been called first.
ELFImage* load_elf_from_filesystem(const char* filename);
void release_elf_image(ELFImage* image);
int check_elf_image(VFS::Node* node);
int check_elf_image_from_filesystem(const char* filename);
}