Changed the boot ELF code to use templates and added ELF64 support.
The actual implementation of the ELF loading methods have been put into an ELFLoader template class that takes a single template parameter, which is a structure containing all the necessary ELF typedefs. It's a bit verbose, but I thought it was a neater solution than using a bunch of standalone functions with a huge number of template parameters. There is no change to code outside of elf.cpp, the ELF32/ELF64 differences are handled internally.
This commit is contained in:
@@ -15,14 +15,6 @@
|
||||
#include <arch_elf.h>
|
||||
|
||||
|
||||
typedef uint32 Elf32_Addr;
|
||||
typedef uint16 Elf32_Half;
|
||||
typedef uint32 Elf32_Off;
|
||||
typedef int32 Elf32_Sword;
|
||||
typedef uint32 Elf32_Word;
|
||||
|
||||
typedef Elf32_Half Elf32_Versym;
|
||||
|
||||
/*** ELF header ***/
|
||||
|
||||
#define EI_NIDENT 16
|
||||
|
||||
Reference in New Issue
Block a user