From e385ae0c72993d1d58256324d0fe425247fad207 Mon Sep 17 00:00:00 2001 From: Curtis Dunham Date: Fri, 3 Jul 2015 10:14:34 -0400 Subject: base: remove fd from object loaders All the object loaders directly examine the (already completely loaded by object_file.cc) memory image. There is no current motivation to keep the fd around. --- src/base/loader/elf_object.hh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/base/loader/elf_object.hh') diff --git a/src/base/loader/elf_object.hh b/src/base/loader/elf_object.hh index 84b73b0a8..969896290 100644 --- a/src/base/loader/elf_object.hh +++ b/src/base/loader/elf_object.hh @@ -65,8 +65,7 @@ class ElfObject : public ObjectFile /// Helper functions for loadGlobalSymbols() and loadLocalSymbols(). bool loadSomeSymbols(SymbolTable *symtab, int binding, Addr mask); - ElfObject(const std::string &_filename, int _fd, - size_t _len, uint8_t *_data, + ElfObject(const std::string &_filename, size_t _len, uint8_t *_data, Arch _arch, OpSys _opSys); void getSections(); @@ -90,7 +89,7 @@ class ElfObject : public ObjectFile virtual bool isDynamic() { return sectionExists(".interp"); } virtual bool hasTLS() { return sectionExists(".tbss"); } - static ObjectFile *tryFile(const std::string &fname, int fd, + static ObjectFile *tryFile(const std::string &fname, size_t len, uint8_t *data); Addr programHeaderTable() {return _programHeaderTable;} uint16_t programHeaderSize() {return _programHeaderSize;} -- cgit v1.2.3