gem5  v22.1.0.0
Classes | Typedefs | Enumerations | Functions | Variables
gem5::loader Namespace Reference

Classes

class  DtbFile
 
class  ElfObjectFormat
 
class  ElfObject
 
class  ImageFile
 
class  ImageFileData
 
class  MemoryImage
 
class  ObjectFile
 
class  ObjectFileFormat
 
class  RawImage
 
struct  Symbol
 
class  SymbolTable
 

Typedefs

typedef std::shared_ptr< ImageFileDataImageFileDataPtr
 

Enumerations

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

Functions

void setInterpDir (const std::string &dirname)
 This is the interface for setting up a base path for the elf interpreter. More...
 
static bool hasGzipMagic (int fd)
 
static int doGzipLoad (int fd)
 
static std::ostream & operator<< (std::ostream &os, const MemoryImage::Segment &seg)
 
const char * archToString (Arch arch)
 
const char * opSysToString (OpSys op_sys)
 
ObjectFilecreateObjectFile (const std::string &fname, bool raw)
 
bool archIs64Bit (const Arch arch)
 Determine whether the loader::Arch is 64-bit or 32-bit. More...
 

Variables

SymbolTable debugSymbolTable
 Global unified debugging symbol table (for target). More...
 

Typedef Documentation

◆ ImageFileDataPtr

Definition at line 61 of file image_file_data.hh.

Enumeration Type Documentation

◆ Arch

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

Definition at line 62 of file object_file.hh.

◆ OpSys

Enumerator
UnknownOpSys 
Tru64 
Linux 
Solaris 
LinuxArmOABI 
LinuxPower64ABIv1 
LinuxPower64ABIv2 
FreeBSD 

Definition at line 81 of file object_file.hh.

Function Documentation

◆ archIs64Bit()

bool gem5::loader::archIs64Bit ( const loader::Arch  arch)

Determine whether the loader::Arch is 64-bit or 32-bit.

Definition at line 152 of file object_file.cc.

References Arm64, Power64, Riscv64, SPARC64, and X86_64.

◆ archToString()

const char * gem5::loader::archToString ( Arch  arch)

Definition at line 58 of file object_file.cc.

References Arm, Arm64, I386, Mips, panic, Power, Power64, Riscv32, Riscv64, SPARC32, SPARC64, Thumb, UnknownArch, and X86_64.

◆ createObjectFile()

ObjectFile * gem5::loader::createObjectFile ( const std::string &  fname,
bool  raw 
)

◆ doGzipLoad()

static int gem5::loader::doGzipLoad ( int  fd)
static

◆ hasGzipMagic()

static bool gem5::loader::hasGzipMagic ( int  fd)
static

Definition at line 50 of file image_file_data.cc.

References gem5::ArmISA::fd, and panic_if.

Referenced by gem5::loader::ImageFileData::ImageFileData().

◆ operator<<()

static std::ostream& gem5::loader::operator<< ( std::ostream &  os,
const MemoryImage::Segment seg 
)
inlinestatic

Definition at line 166 of file memory_image.hh.

References gem5::ccprintf(), gem5::X86ISA::os, and gem5::X86ISA::seg.

◆ opSysToString()

const char * gem5::loader::opSysToString ( OpSys  op_sys)

◆ setInterpDir()

void gem5::loader::setInterpDir ( const std::string &  dirname)

This is the interface for setting up a base path for the elf interpreter.

This is needed when loading a cross-compiled (guest ISA != host ISA) dynamically linked application.

Parameters
dirnamebase path for the interpreter

Definition at line 103 of file elf_object.cc.

References fatal_if.

Referenced by gem5::init_loader().

Variable Documentation

◆ debugSymbolTable

SymbolTable gem5::loader::debugSymbolTable

Global unified debugging symbol table (for target).

Conceptually there should be one of these per System object for full system, and per Process object for non-full-system, but so far one big global one has worked well enough.

Definition at line 44 of file symtab.cc.

Referenced by gem5::pseudo_inst::addsymbol(), gem5::ArmISA::FsWorkload::FsWorkload(), gem5::ArmISA::FsFreebsd::initState(), gem5::ArmISA::FsLinux::initState(), gem5::PowerProcess::initState(), gem5::memory::AbstractMemory::initState(), gem5::X86ISA::PageFault::invoke(), gem5::KernelWorkload::KernelWorkload(), gem5::mmapFunc(), gem5::Process::Process(), gem5::BaseCPU::traceFunctionsInternal(), and gem5::trace::ExeTracerRecord::traceInst().


Generated on Wed Dec 21 2022 10:24:15 for gem5 by doxygen 1.9.1