Changed runtime_loader to use elf_* typedefs over Elf32_*.

This means that it will be using ELF64 types on x86_64 rather than
ELF32. The next step for supporting x86_64 is to implement relocations.
This commit is contained in:
Alex Smith
2012-07-25 15:05:21 +01:00
parent ce35b7a68a
commit e3ac2588e6
12 changed files with 133 additions and 137 deletions
@@ -15,6 +15,7 @@
#include <OS.h>
#include <elf32.h>
#include <elf64.h>
// #pragma mark - runtime loader libroot interface
@@ -100,13 +101,13 @@ typedef struct image_t {
// pointer to symbol participation data structures
uint32 *symhash;
struct Elf32_Sym *syms;
elf_sym *syms;
char *strtab;
struct Elf32_Rel *rel;
elf_rel *rel;
int rel_len;
struct Elf32_Rela *rela;
elf_rela *rela;
int rela_len;
struct Elf32_Rel *pltrel;
elf_rel *pltrel;
int pltrel_len;
uint32 num_needed;
@@ -114,20 +115,20 @@ typedef struct image_t {
// versioning related structures
uint32 num_version_definitions;
struct Elf32_Verdef *version_definitions;
elf_verdef *version_definitions;
uint32 num_needed_versions;
struct Elf32_Verneed *needed_versions;
Elf32_Versym *symbol_versions;
elf_verneed *needed_versions;
elf_versym *symbol_versions;
elf_version_info *versions;
uint32 num_versions;
#ifdef __cplusplus
struct Elf32_Sym* (*find_undefined_symbol)(struct image_t* rootImage,
elf_sym* (*find_undefined_symbol)(struct image_t* rootImage,
struct image_t* image,
const SymbolLookupInfo& lookupInfo,
struct image_t** foundInImage);
#else
struct Elf32_Sym* (*find_undefined_symbol)(struct image_t* rootImage,
elf_sym* (*find_undefined_symbol)(struct image_t* rootImage,
struct image_t* image,
const struct SymbolLookupInfo* lookupInfo,
struct image_t** foundInImage);