gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ObjectFile Class Reference

#include <object_file.hh>

Inheritance diagram for ObjectFile:
ImageFile AoutObject EcoffObject ElfObject RawImage

Public Types

enum  Arch {
  UnknownArch, Alpha, SPARC64, SPARC32,
  Mips, X86_64, I386, Arm64,
  Arm, Thumb, Power, Riscv64,
  Riscv32
}
 
enum  OpSys {
  UnknownOpSys, Tru64, Linux, Solaris,
  LinuxArmOABI, FreeBSD
}
 

Public Member Functions

virtual ~ObjectFile ()
 
virtual bool loadAllSymbols (SymbolTable *symtab, Addr base=0, Addr offset=0, Addr mask=MaxAddr)
 
virtual bool loadGlobalSymbols (SymbolTable *symtab, Addr base=0, Addr offset=0, Addr mask=MaxAddr)
 
virtual bool loadLocalSymbols (SymbolTable *symtab, Addr base=0, Addr offset=0, Addr mask=MaxAddr)
 
virtual bool loadWeakSymbols (SymbolTable *symtab, Addr base=0, Addr offset=0, Addr mask=MaxAddr)
 
virtual ObjectFilegetInterpreter () const
 
virtual bool relocatable () const
 
virtual Addr mapSize () const
 
virtual void updateBias (Addr bias_addr)
 
virtual Addr bias () const
 
virtual bool hasTLS ()
 
Arch getArch () const
 
OpSys getOpSys () const
 
Addr entryPoint () const
 
- Public Member Functions inherited from ImageFile
virtual MemoryImage buildImage () const =0
 

Protected Member Functions

 ObjectFile (ImageFileDataPtr ifd)
 
- Protected Member Functions inherited from ImageFile
 ImageFile (ImageFileDataPtr data)
 
virtual ~ImageFile ()
 

Protected Attributes

Arch arch = UnknownArch
 
OpSys opSys = UnknownOpSys
 
Addr entry = 0
 
- Protected Attributes inherited from ImageFile
ImageFileDataPtr imageData
 

Detailed Description

Definition at line 45 of file object_file.hh.

Member Enumeration Documentation

◆ Arch

Enumerator
UnknownArch 
Alpha 
SPARC64 
SPARC32 
Mips 
X86_64 
I386 
Arm64 
Arm 
Thumb 
Power 
Riscv64 
Riscv32 

Definition at line 49 of file object_file.hh.

◆ OpSys

Enumerator
UnknownOpSys 
Tru64 
Linux 
Solaris 
LinuxArmOABI 
FreeBSD 

Definition at line 65 of file object_file.hh.

Constructor & Destructor Documentation

◆ ObjectFile()

ObjectFile::ObjectFile ( ImageFileDataPtr  ifd)
protected

Definition at line 43 of file object_file.cc.

◆ ~ObjectFile()

virtual ObjectFile::~ObjectFile ( )
inlinevirtual

Definition at line 81 of file object_file.hh.

Member Function Documentation

◆ bias()

virtual Addr ObjectFile::bias ( ) const
inlinevirtual

Reimplemented in ElfObject.

Definition at line 120 of file object_file.hh.

Referenced by Process::getBias().

◆ entryPoint()

Addr ObjectFile::entryPoint ( ) const
inline

◆ getArch()

Arch ObjectFile::getArch ( ) const
inline

Definition at line 124 of file object_file.hh.

References arch.

Referenced by ArmSystem::ArmSystem(), ArmSystem::getBootLoader(), and X86System::initState().

◆ getInterpreter()

virtual ObjectFile* ObjectFile::getInterpreter ( ) const
inlinevirtual

Reimplemented in ElfObject.

Definition at line 108 of file object_file.hh.

Referenced by Process::getInterpreter(), Process::init(), and Process::updateBias().

◆ getOpSys()

OpSys ObjectFile::getOpSys ( ) const
inline

◆ hasTLS()

virtual bool ObjectFile::hasTLS ( )
inlinevirtual

Reimplemented in ElfObject.

Definition at line 122 of file object_file.hh.

◆ loadAllSymbols()

virtual bool ObjectFile::loadAllSymbols ( SymbolTable symtab,
Addr  base = 0,
Addr  offset = 0,
Addr  mask = MaxAddr 
)
inlinevirtual

Reimplemented in ElfObject, and EcoffObject.

Definition at line 84 of file object_file.hh.

Referenced by mmapFunc().

◆ loadGlobalSymbols()

virtual bool ObjectFile::loadGlobalSymbols ( SymbolTable symtab,
Addr  base = 0,
Addr  offset = 0,
Addr  mask = MaxAddr 
)
inlinevirtual

◆ loadLocalSymbols()

virtual bool ObjectFile::loadLocalSymbols ( SymbolTable symtab,
Addr  base = 0,
Addr  offset = 0,
Addr  mask = MaxAddr 
)
inlinevirtual

◆ loadWeakSymbols()

virtual bool ObjectFile::loadWeakSymbols ( SymbolTable symtab,
Addr  base = 0,
Addr  offset = 0,
Addr  mask = MaxAddr 
)
inlinevirtual

Reimplemented in ElfObject.

Definition at line 102 of file object_file.hh.

Referenced by Process::Process().

◆ mapSize()

virtual Addr ObjectFile::mapSize ( ) const
inlinevirtual

Reimplemented in ElfObject.

Definition at line 111 of file object_file.hh.

References panic.

Referenced by Process::updateBias().

◆ relocatable()

virtual bool ObjectFile::relocatable ( ) const
inlinevirtual

Reimplemented in ElfObject.

Definition at line 109 of file object_file.hh.

Referenced by Process::updateBias().

◆ updateBias()

virtual void ObjectFile::updateBias ( Addr  bias_addr)
inlinevirtual

Reimplemented in ElfObject.

Definition at line 116 of file object_file.hh.

References panic.

Referenced by Process::updateBias().

Member Data Documentation

◆ arch

Arch ObjectFile::arch = UnknownArch
protected

◆ entry

Addr ObjectFile::entry = 0
protected

◆ opSys

OpSys ObjectFile::opSys = UnknownOpSys
protected

Definition at line 76 of file object_file.hh.

Referenced by ElfObject::determineOpSys(), EcoffObject::EcoffObject(), and getOpSys().


The documentation for this class was generated from the following files:

Generated on Fri Feb 28 2020 16:27:14 for gem5 by doxygen 1.8.13