elf_object.hh (10037:5cac77888310) elf_object.hh (10880:61a56f76222b)
1/*
2 * Copyright (c) 2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 51 unchanged lines hidden (view full) ---

60 Addr _programHeaderTable;
61 uint16_t _programHeaderSize;
62 uint16_t _programHeaderCount;
63 std::set<std::string> sectionNames;
64
65 /// Helper functions for loadGlobalSymbols() and loadLocalSymbols().
66 bool loadSomeSymbols(SymbolTable *symtab, int binding, Addr mask);
67
1/*
2 * Copyright (c) 2013 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 51 unchanged lines hidden (view full) ---

60 Addr _programHeaderTable;
61 uint16_t _programHeaderSize;
62 uint16_t _programHeaderCount;
63 std::set<std::string> sectionNames;
64
65 /// Helper functions for loadGlobalSymbols() and loadLocalSymbols().
66 bool loadSomeSymbols(SymbolTable *symtab, int binding, Addr mask);
67
68 ElfObject(const std::string &_filename, int _fd,
69 size_t _len, uint8_t *_data,
68 ElfObject(const std::string &_filename, size_t _len, uint8_t *_data,
70 Arch _arch, OpSys _opSys);
71
72 void getSections();
73 bool sectionExists(std::string sec);
74
75 std::vector<Segment> extraSegments;
76
77 public:

--- 7 unchanged lines hidden (view full) ---

85 virtual bool loadLocalSymbols(SymbolTable *symtab, Addr addrMask =
86 std::numeric_limits<Addr>::max());
87 virtual bool loadWeakSymbols(SymbolTable *symtab, Addr addrMask =
88 std::numeric_limits<Addr>::max());
89
90 virtual bool isDynamic() { return sectionExists(".interp"); }
91 virtual bool hasTLS() { return sectionExists(".tbss"); }
92
69 Arch _arch, OpSys _opSys);
70
71 void getSections();
72 bool sectionExists(std::string sec);
73
74 std::vector<Segment> extraSegments;
75
76 public:

--- 7 unchanged lines hidden (view full) ---

84 virtual bool loadLocalSymbols(SymbolTable *symtab, Addr addrMask =
85 std::numeric_limits<Addr>::max());
86 virtual bool loadWeakSymbols(SymbolTable *symtab, Addr addrMask =
87 std::numeric_limits<Addr>::max());
88
89 virtual bool isDynamic() { return sectionExists(".interp"); }
90 virtual bool hasTLS() { return sectionExists(".tbss"); }
91
93 static ObjectFile *tryFile(const std::string &fname, int fd,
92 static ObjectFile *tryFile(const std::string &fname,
94 size_t len, uint8_t *data);
95 Addr programHeaderTable() {return _programHeaderTable;}
96 uint16_t programHeaderSize() {return _programHeaderSize;}
97 uint16_t programHeaderCount() {return _programHeaderCount;}
98};
99
100#endif // __ELF_OBJECT_HH__
93 size_t len, uint8_t *data);
94 Addr programHeaderTable() {return _programHeaderTable;}
95 uint16_t programHeaderSize() {return _programHeaderSize;}
96 uint16_t programHeaderCount() {return _programHeaderCount;}
97};
98
99#endif // __ELF_OBJECT_HH__