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:
Alex Smith
2012-06-23 12:05:16 +01:00
parent 3a2a3367dc
commit ccadfaeeb5
6 changed files with 415 additions and 306 deletions
-8
View File
@@ -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