| 
    gem5
    
   | 
 
#include <elf_object.hh>
  
 Public Member Functions | |
| virtual | ~ElfObject () | 
| bool | loadSections (PortProxy &mem_proxy, Addr addr_mask=maxAddr, Addr offset=0) override | 
| virtual bool | loadAllSymbols (SymbolTable *symtab, Addr base=0, Addr offset=0, Addr addr_mask=maxAddr) override | 
| virtual bool | loadGlobalSymbols (SymbolTable *symtab, Addr base=0, Addr offset=0, Addr addr_mask=maxAddr) override | 
| virtual bool | loadLocalSymbols (SymbolTable *symtab, Addr base=0, Addr offset=0, Addr addr_mask=maxAddr) override | 
| virtual bool | loadWeakSymbols (SymbolTable *symtab, Addr base=0, Addr offset=0, Addr addr_mask=maxAddr) override | 
| virtual ObjectFile * | getInterpreter () const override | 
| virtual Addr | bias () const override | 
| virtual bool | relocatable () const override | 
| virtual Addr | mapSize () const override | 
| virtual void | updateBias (Addr bias_addr) override | 
| virtual bool | hasTLS () override | 
| Addr | programHeaderTable () | 
| uint16_t | programHeaderSize () | 
| uint16_t | programHeaderCount () | 
  Public Member Functions inherited from ObjectFile | |
| virtual | ~ObjectFile () | 
| Arch | getArch () const | 
| OpSys | getOpSys () const | 
| Addr | entryPoint () const | 
| Addr | globalPointer () const | 
| Addr | textBase () const | 
| Addr | dataBase () const | 
| Addr | bssBase () const | 
| size_t | textSize () const | 
| size_t | dataSize () const | 
| size_t | bssSize () const | 
| void | setTextBase (Addr a) | 
Static Public Member Functions | |
| static ObjectFile * | tryFile (const std::string &fname, size_t len, uint8_t *data, bool skip_interp_check=false) | 
Protected Types | |
| typedef ObjectFile::Section | Segment | 
Protected Member Functions | |
| bool | loadSomeSymbols (SymbolTable *symtab, int binding, Addr mask, Addr base, Addr offset) | 
| Helper functions for loadGlobalSymbols() and loadLocalSymbols().  More... | |
| ElfObject (const std::string &_filename, size_t _len, uint8_t *_data, Arch _arch, OpSys _opSys) | |
| void | getSections () | 
| bool | sectionExists (std::string sec) | 
  Protected Member Functions inherited from ObjectFile | |
| ObjectFile (const std::string &_filename, size_t _len, uint8_t *_data, Arch _arch, OpSys _opSys) | |
| bool | loadSection (Section *sec, PortProxy &mem_proxy, Addr mask, Addr offset=0) | 
| void | setGlobalPointer (Addr global_ptr) | 
Protected Attributes | |
| Addr | _programHeaderTable | 
| uint16_t | _programHeaderSize | 
| uint16_t | _programHeaderCount | 
| std::set< std::string > | sectionNames | 
| ElfObject * | interpreter | 
| Addr | ldBias | 
| bool | relocate | 
| Addr | ldMin | 
| Addr | ldMax | 
| std::vector< Segment > | extraSegments | 
  Protected Attributes inherited from ObjectFile | |
| const std::string | filename | 
| uint8_t * | fileData | 
| size_t | len | 
| Arch | arch | 
| OpSys | opSys | 
| Addr | entry | 
| Addr | globalPtr | 
| Section | text | 
| Section | data | 
| Section | bss | 
Additional Inherited Members | |
  Public Types inherited from ObjectFile | |
| enum | Arch {  UnknownArch, Alpha, SPARC64, SPARC32, Mips, X86_64, I386, Arm64, Arm, Thumb, Power, Riscv }  | 
| enum | OpSys {  UnknownOpSys, Tru64, Linux, Solaris, LinuxArmOABI, FreeBSD }  | 
  Static Public Attributes inherited from ObjectFile | |
| static const Addr | maxAddr = std::numeric_limits<Addr>::max() | 
Definition at line 51 of file elf_object.hh.
      
  | 
  protected | 
Definition at line 55 of file elf_object.hh.
      
  | 
  protected | 
Definition at line 272 of file elf_object.cc.
References ObjectFile::Section::baseAddr, ObjectFile::bss, ObjectFile::data, DPRINTFR, ObjectFile::entry, extraSegments, fatal, ObjectFile::fileData, ObjectFile::Section::fileImage, ObjectFile::filename, ArmISA::i, ldMax, ldMin, ObjectFile::len, panic, relocate, ObjectFile::Section::size, ObjectFile::text, and warn_if.
Referenced by tryFile().
      
  | 
  inlinevirtual | 
Definition at line 95 of file elf_object.hh.
      
  | 
  inlineoverridevirtual | 
      
  | 
  inlineoverridevirtual | 
Reimplemented from ObjectFile.
Definition at line 117 of file elf_object.hh.
References interpreter.
      
  | 
  protected | 
Definition at line 519 of file elf_object.cc.
References ObjectFile::fileData, ObjectFile::len, panic, and sectionNames.
Referenced by sectionExists().
      
  | 
  inlineoverridevirtual | 
Reimplemented from ObjectFile.
Definition at line 124 of file elf_object.hh.
References sectionExists().
      
  | 
  overridevirtual | 
Implements ObjectFile.
Definition at line 459 of file elf_object.cc.
References loadGlobalSymbols(), loadLocalSymbols(), and loadWeakSymbols().
      
  | 
  overridevirtual | 
Implements ObjectFile.
Definition at line 468 of file elf_object.cc.
References interpreter, and loadSomeSymbols().
Referenced by loadAllSymbols().
      
  | 
  overridevirtual | 
Implements ObjectFile.
Definition at line 479 of file elf_object.cc.
References interpreter, and loadSomeSymbols().
Referenced by loadAllSymbols().
      
  | 
  overridevirtual | 
Reimplemented from ObjectFile.
Definition at line 501 of file elf_object.cc.
References extraSegments, interpreter, ObjectFile::loadSection(), ObjectFile::loadSections(), loadSections(), and X86ISA::seg.
Referenced by loadSections().
      
  | 
  protected | 
Helper functions for loadGlobalSymbols() and loadLocalSymbols().
Definition at line 403 of file elf_object.cc.
References X86ISA::count, ObjectFile::data, DPRINTF, ObjectFile::fileData, ArmISA::i, SymbolTable::insert(), ObjectFile::len, ArmISA::offset, and panic.
Referenced by loadGlobalSymbols(), loadLocalSymbols(), and loadWeakSymbols().
      
  | 
  overridevirtual | 
Reimplemented from ObjectFile.
Definition at line 490 of file elf_object.cc.
References interpreter, and loadSomeSymbols().
Referenced by loadAllSymbols().
      
  | 
  inlineoverridevirtual | 
Reimplemented from ObjectFile.
Definition at line 121 of file elf_object.hh.
      
  | 
  inline | 
Definition at line 131 of file elf_object.hh.
References _programHeaderCount.
Referenced by AlphaProcess::argsInit(), MipsProcess::argsInit(), PowerProcess::argsInit(), RiscvProcess::argsInit(), SparcProcess::argsInit(), ArmProcess::argsInit(), and X86ISA::X86Process::argsInit().
      
  | 
  inline | 
Definition at line 130 of file elf_object.hh.
References _programHeaderSize.
Referenced by MipsProcess::argsInit(), PowerProcess::argsInit(), RiscvProcess::argsInit(), SparcProcess::argsInit(), ArmProcess::argsInit(), and X86ISA::X86Process::argsInit().
      
  | 
  inline | 
Definition at line 129 of file elf_object.hh.
References _programHeaderTable.
Referenced by AlphaProcess::argsInit(), MipsProcess::argsInit(), PowerProcess::argsInit(), RiscvProcess::argsInit(), SparcProcess::argsInit(), ArmProcess::argsInit(), and X86ISA::X86Process::argsInit().
      
  | 
  inlineoverridevirtual | 
      
  | 
  protected | 
Definition at line 553 of file elf_object.cc.
References getSections(), and sectionNames.
Referenced by hasTLS().
      
  | 
  static | 
Definition at line 64 of file elf_object.cc.
References _programHeaderCount, _programHeaderSize, _programHeaderTable, ObjectFile::Alpha, ObjectFile::arch, ObjectFile::Arm, ObjectFile::Arm64, bits(), DPRINTFR, ElfObject(), fatal, ArmISA::fd, ObjectFile::FreeBSD, htobe(), htole(), ArmISA::i, ObjectFile::I386, interpreter, ObjectFile::Linux, ObjectFile::LinuxArmOABI, M5_VAR_USED, ObjectFile::Mips, SparcISA::mm, panic, ObjectFile::Power, ObjectFile::Riscv, ObjectFile::Solaris, ObjectFile::SPARC32, ObjectFile::SPARC64, ObjectFile::Thumb, ObjectFile::Tru64, ObjectFile::UnknownArch, ObjectFile::UnknownOpSys, warn, and ObjectFile::X86_64.
Referenced by createObjectFile().
      
  | 
  overridevirtual | 
Reimplemented from ObjectFile.
Definition at line 563 of file elf_object.cc.
References ObjectFile::Section::baseAddr, ObjectFile::bss, ObjectFile::data, ObjectFile::entry, extraSegments, ldBias, and ObjectFile::text.
      
  | 
  protected | 
Definition at line 61 of file elf_object.hh.
Referenced by programHeaderCount(), and tryFile().
      
  | 
  protected | 
Definition at line 60 of file elf_object.hh.
Referenced by programHeaderSize(), and tryFile().
      
  | 
  protected | 
Definition at line 59 of file elf_object.hh.
Referenced by programHeaderTable(), and tryFile().
      
  | 
  protected | 
Definition at line 92 of file elf_object.hh.
Referenced by ElfObject(), loadSections(), and updateBias().
      
  | 
  protected | 
Definition at line 64 of file elf_object.hh.
Referenced by getInterpreter(), loadGlobalSymbols(), loadLocalSymbols(), loadSections(), loadWeakSymbols(), and tryFile().
      
  | 
  protected | 
Definition at line 69 of file elf_object.hh.
Referenced by bias(), and updateBias().
      
  | 
  protected | 
Definition at line 80 of file elf_object.hh.
Referenced by ElfObject(), and mapSize().
      
  | 
  protected | 
Definition at line 79 of file elf_object.hh.
Referenced by ElfObject(), and mapSize().
      
  | 
  protected | 
Definition at line 75 of file elf_object.hh.
Referenced by ElfObject(), and relocatable().
      
  | 
  protected | 
Definition at line 62 of file elf_object.hh.
Referenced by getSections(), and sectionExists().