diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2004-01-07 19:46:45 -0500 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2004-01-07 19:46:45 -0500 |
commit | 14b4119aafccefb1dea2854bba8a70fa670cbef5 (patch) | |
tree | 46eac0d4ab64e0416de5f05a3a306b24326ff954 /base/loader/elf_object.hh | |
parent | 85d75e6dfca7a97e19e4407ff0d76e313daa848e (diff) | |
download | gem5-14b4119aafccefb1dea2854bba8a70fa670cbef5.tar.xz |
Changed elf_object.* to use libelf for reading elf files. The makefile
and setup filed had to be modified to build libelf. The ext repository
MUST exist in the directory below m5!
base/loader/elf_object.cc:
base/loader/elf_object.hh:
now uses libelf to read elf binaries
--HG--
extra : convert_revision : b70511f5379edf35d639f3bb64b786cb0bd180af
Diffstat (limited to 'base/loader/elf_object.hh')
-rw-r--r-- | base/loader/elf_object.hh | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/base/loader/elf_object.hh b/base/loader/elf_object.hh index 10d97d089..afd4cd62b 100644 --- a/base/loader/elf_object.hh +++ b/base/loader/elf_object.hh @@ -29,20 +29,13 @@ #ifndef __ELF_OBJECT_HH__ #define __ELF_OBJECT_HH__ +#include <libelf/gelf.h> +#include <libelf/libelf.h> #include "base/loader/object_file.hh" -// forward decls: avoid including exec_elf.hh here -struct Elf64_Ehdr; -struct Elf64_Phdr; - class ElfObject : public ObjectFile { protected: - Elf64_Ehdr *ehdr; - Elf64_Phdr *phdr; - - int textPhdrIdx; - int dataPhdrIdx; ElfObject(const std::string &_filename, int _fd, size_t _len, uint8_t *_data, |