#include <include/BinaryFile.h>
Inheritance diagram for BinaryFile:
Definition at line 144 of file BinaryFile.h.
Public Member Functions | |
virtual void | AddSymbol (ADDRESS uNative, const char *pName) |
BinaryFile (bool bArchive=false) | |
virtual void | Close ()=0 |
virtual bool | DisplayDetails (const char *fileName, FILE *f=stdout) |
virtual ADDRESS | GetAddressByName (const char *pName, bool bNoTypeOK=false) |
virtual std::list< const char * > | getDependencyList ()=0 |
virtual std::map< ADDRESS, const char * > * | GetDynamicGlobalMap () |
virtual const char * | GetDynamicProcName (ADDRESS uNative) |
virtual ADDRESS | GetEntryPoint ()=0 |
virtual std::list< SectionInfo * > & | GetEntryPoints (const char *pEntry="main")=0 |
virtual std::vector< ADDRESS > | GetExportedAddresses (bool funcsOnly=true) |
virtual const char * | getFilename () const =0 |
virtual const char * | getFilenameSymbolFor (const char *sym) |
virtual LOAD_FMT | GetFormat () const =0 |
virtual std::map< ADDRESS, std::string > & | getFuncSymbols () |
virtual std::pair< unsigned, unsigned > | GetGlobalPointerInfo () |
virtual ADDRESS | getImageBase ()=0 |
virtual size_t | getImageSize ()=0 |
virtual ADDRESS * | GetImportStubs (int &numImports) |
ADDRESS | getLimitTextHigh () |
ADDRESS | getLimitTextLow () |
virtual MACHINE | GetMachine () const =0 |
virtual ADDRESS | GetMainEntryPoint ()=0 |
int | GetNumSections () const |
virtual std::map< std::string, ObjcModule > & | getObjcModules () |
int | GetSectionIndexByName (const char *sName) |
PSectionInfo | GetSectionInfo (int idx) const |
PSectionInfo | GetSectionInfoByAddr (ADDRESS uEntry) const |
PSectionInfo | GetSectionInfoByName (const char *sName) |
virtual int | GetSizeByName (const char *pName, bool bTypeOK=false) |
virtual std::map< ADDRESS, std::string > & | getSymbols () |
int | getTextDelta () |
virtual bool | hasDebugInfo () |
virtual bool | IsDynamicLinkedProc (ADDRESS uNative) |
virtual bool | IsDynamicLinkedProcPointer (ADDRESS uNative) |
virtual ADDRESS | IsJumpToAnotherAddr (ADDRESS uNative) |
virtual bool | isLibrary () const =0 |
bool | isReadOnly (ADDRESS uEntry) |
virtual bool | isRelocatable () const |
virtual bool | IsRelocationAt (ADDRESS uNative) |
virtual bool | IsStaticLinkedLibProc (ADDRESS uNative) |
virtual bool | Open (const char *sName)=0 |
virtual int | readNative1 (ADDRESS a) |
virtual int | readNative2 (ADDRESS a) |
virtual int | readNative4 (ADDRESS a) |
virtual QWord | readNative8 (ADDRESS a) |
virtual float | readNativeFloat4 (ADDRESS a) |
virtual double | readNativeFloat8 (ADDRESS a) |
virtual bool | RealLoad (const char *sName)=0 |
virtual const char * | SymbolByAddress (ADDRESS uNative) |
virtual void | UnLoad ()=0 |
virtual | ~BinaryFile () |
Protected Member Functions | |
void | getTextLimits () |
virtual bool | PostLoad (void *handle)=0 |
Protected Attributes | |
ADDRESS | limitTextHigh |
ADDRESS | limitTextLow |
bool | m_bArchive |
int | m_iNumSections |
PSectionInfo | m_pSections |
ADDRESS | m_uInitPC |
ADDRESS | m_uInitSP |
int | textDelta |
Friends | |
class | ArchiveFile |
class | BinaryFileFactory |
|
Definition at line 151 of file BinaryFile.h. |
|
Definition at line 40 of file BinaryFile.cpp. References m_bArchive, m_iNumSections, and m_pSections. |
|
Reimplemented in DOS4GWBinaryFile, ElfBinaryFile, MachOBinaryFile, and Win32BinaryFile. Definition at line 211 of file BinaryFile.h. Referenced by FrontEnd::AddSymbol(). |
|
Implemented in BinaryFileStub, DOS4GWBinaryFile, ElfBinaryFile, ExeBinaryFile, HpSomBinaryFile, MachOBinaryFile, PalmBinaryFile, and Win32BinaryFile. Referenced by FrontPentTest::testFindMain(). |
|
Reimplemented in BinaryFileStub, DOS4GWBinaryFile, ExeBinaryFile, MachOBinaryFile, and Win32BinaryFile. Definition at line 144 of file BinaryFile.cpp. Referenced by main(). |
|
Reimplemented in DOS4GWBinaryFile, ElfBinaryFile, MachOBinaryFile, and Win32BinaryFile. Definition at line 113 of file BinaryFile.cpp. Referenced by FrontEnd::getEntryPoints(). |
|
Implemented in BinaryFileStub, DOS4GWBinaryFile, ElfBinaryFile, ExeBinaryFile, HpSomBinaryFile, MachOBinaryFile, PalmBinaryFile, and Win32BinaryFile. |
|
Reimplemented in BinaryFileStub, ElfBinaryFile, and HpSomBinaryFile. Definition at line 164 of file BinaryFile.cpp. |
|
Reimplemented in DOS4GWBinaryFile, MachOBinaryFile, and Win32BinaryFile. Definition at line 139 of file BinaryFile.cpp. Referenced by Prog::GetDynamicProcName(). |
|
Implemented in BinaryFileStub, DOS4GWBinaryFile, ElfBinaryFile, ExeBinaryFile, HpSomBinaryFile, MachOBinaryFile, PalmBinaryFile, and Win32BinaryFile. Referenced by ST20FrontEnd::getMainEntryPoint(), SparcFrontEnd::getMainEntryPoint(), and PPCFrontEnd::getMainEntryPoint(). |
|
Implemented in BinaryFileStub, DOS4GWBinaryFile, ElfBinaryFile, ExeBinaryFile, HpSomBinaryFile, MachOBinaryFile, PalmBinaryFile, and Win32BinaryFile. |
|
Reimplemented in ElfBinaryFile. Definition at line 218 of file BinaryFile.h. |
|
Implemented in BinaryFileStub, DOS4GWBinaryFile, ElfBinaryFile, ExeBinaryFile, HpSomBinaryFile, MachOBinaryFile, PalmBinaryFile, and Win32BinaryFile. Referenced by FrontEnd::getEntryPoints(), and Prog::setFrontEnd(). |
|
Reimplemented in ElfBinaryFile. Definition at line 217 of file BinaryFile.h. References NULL. Referenced by Prog::getDefaultCluster(). |
|
Implemented in BinaryFileStub, DOS4GWBinaryFile, ElfBinaryFile, ExeBinaryFile, HpSomBinaryFile, MachOBinaryFile, PalmBinaryFile, and Win32BinaryFile. Referenced by FrontEnd::isWin32(). |
|
Definition at line 269 of file BinaryFile.h. |
|
Reimplemented in HpSomBinaryFile, and PalmBinaryFile. Definition at line 156 of file BinaryFile.cpp. |
|
Implemented in BinaryFileStub, DOS4GWBinaryFile, ElfBinaryFile, ExeBinaryFile, HpSomBinaryFile, MachOBinaryFile, PalmBinaryFile, and Win32BinaryFile. Referenced by Prog::getImageBase(). |
|
Implemented in BinaryFileStub, DOS4GWBinaryFile, ElfBinaryFile, ExeBinaryFile, HpSomBinaryFile, MachOBinaryFile, PalmBinaryFile, and Win32BinaryFile. Referenced by Prog::getImageSize(). |
|
Reimplemented in BinaryFileStub, and ElfBinaryFile. Definition at line 170 of file BinaryFile.cpp. References NULL. |
|
Definition at line 276 of file BinaryFile.h. Referenced by FrontEnd::decode(), Prog::decodeEntryPoint(), Prog::decodeFragment(), and Prog::getLimitTextHigh(). |
|
Definition at line 275 of file BinaryFile.h. Referenced by FrontEnd::decode(), Prog::decodeFragment(), and Prog::getLimitTextLow(). |
|
|
Implemented in BinaryFileStub, DOS4GWBinaryFile, ElfBinaryFile, ExeBinaryFile, HpSomBinaryFile, MachOBinaryFile, PalmBinaryFile, and Win32BinaryFile. Referenced by ST20FrontEnd::getMainEntryPoint(), SparcFrontEnd::getMainEntryPoint(), and PPCFrontEnd::getMainEntryPoint(). |
|
Definition at line 57 of file BinaryFile.cpp. References m_iNumSections. Referenced by Prog::getCodeInfo(), getTextLimits(), main(), LoaderTest::testHppaLoad(), LoaderTest::testPalmLoad(), LoaderTest::testPentiumLoad(), LoaderTest::testSparcLoad(), and LoaderTest::testWinLoad(). |
|
Reimplemented in MachOBinaryFile. Definition at line 273 of file BinaryFile.h. |
|
Definition at line 67 of file BinaryFile.cpp. References m_iNumSections, and m_pSections. Referenced by ElfBinaryFile::GetDynamicGlobalMap(), GetSectionInfoByName(), and ElfBinaryFile::ValueByName(). |
|
|
|
|
Reimplemented in ElfBinaryFile. Definition at line 117 of file BinaryFile.cpp. Referenced by Prog::addReloc(), Prog::guessGlobalType(), and Prog::makeArrayType(). |
|
Reimplemented in DOS4GWBinaryFile, ElfBinaryFile, MachOBinaryFile, and Win32BinaryFile. Definition at line 271 of file BinaryFile.h. Referenced by Prog::addReloc(), and Prog::getSymbols(). |
|
Definition at line 278 of file BinaryFile.h. Referenced by Prog::getTextDelta(), and SparcFrontEnd::processProc(). |
|
Definition at line 176 of file BinaryFile.cpp. References GetNumSections(), GetSectionInfo(), limitTextHigh, limitTextLow, and textDelta. Referenced by BinaryFileStub::BinaryFileStub(). |
|
Reimplemented in Win32BinaryFile. Definition at line 280 of file BinaryFile.h. |
|
Reimplemented in DOS4GWBinaryFile, ElfBinaryFile, HpSomBinaryFile, MachOBinaryFile, and PalmBinaryFile. Definition at line 121 of file BinaryFile.cpp. Referenced by SparcFrontEnd::helperFunc(), FrontEnd::processProc(), and Prog::setNewProc(). |
|
Reimplemented in DOS4GWBinaryFile, and Win32BinaryFile. Definition at line 129 of file BinaryFile.cpp. Referenced by Prog::isDynamicLinkedProcPointer(). |
|
Reimplemented in Win32BinaryFile. Definition at line 134 of file BinaryFile.cpp. References NO_ADDRESS. Referenced by Prog::setNewProc(). |
|
Implemented in BinaryFileStub, DOS4GWBinaryFile, ElfBinaryFile, ExeBinaryFile, HpSomBinaryFile, MachOBinaryFile, PalmBinaryFile, and Win32BinaryFile. |
|
Definition at line 190 of file BinaryFile.h. References SectionInfo::bReadOnly. Referenced by Prog::isReadOnly(). |
|
Definition at line 172 of file BinaryFile.h. |
|
Reimplemented in ElfBinaryFile. Definition at line 226 of file BinaryFile.h. Referenced by Prog::addReloc(). |
|
Reimplemented in Win32BinaryFile. Definition at line 125 of file BinaryFile.cpp. Referenced by Prog::setNewProc(). |
|
Implemented in BinaryFileStub, DOS4GWBinaryFile, ElfBinaryFile, ExeBinaryFile, HpSomBinaryFile, MachOBinaryFile, PalmBinaryFile, and Win32BinaryFile. |
|
Implemented in BinaryFileStub, DOS4GWBinaryFile, ElfBinaryFile, ExeBinaryFile, HpSomBinaryFile, MachOBinaryFile, PalmBinaryFile, and Win32BinaryFile. |
|
Reimplemented in DOS4GWBinaryFile, ElfBinaryFile, MachOBinaryFile, and Win32BinaryFile. Definition at line 194 of file BinaryFile.h. Referenced by PentiumFrontEnd::decodeInstruction(), Prog::generateCode(), FrontEnd::processProc(), and Prog::readNative1(). |
|
Reimplemented in DOS4GWBinaryFile, ElfBinaryFile, MachOBinaryFile, and Win32BinaryFile. Definition at line 196 of file BinaryFile.h. Referenced by Prog::readNative2(). |
|
Reimplemented in DOS4GWBinaryFile, ElfBinaryFile, MachOBinaryFile, and Win32BinaryFile. Definition at line 198 of file BinaryFile.h. Referenced by FrontEnd::getEntryPoints(), and Prog::readNative4(). |
|
Reimplemented in DOS4GWBinaryFile, ElfBinaryFile, MachOBinaryFile, and Win32BinaryFile. Definition at line 200 of file BinaryFile.h. Referenced by Prog::readNative8(). |
|
Reimplemented in DOS4GWBinaryFile, ElfBinaryFile, MachOBinaryFile, and Win32BinaryFile. Definition at line 202 of file BinaryFile.h. Referenced by Prog::getFloatConstant(), and Prog::readNativeFloat4(). |
|
Reimplemented in DOS4GWBinaryFile, ElfBinaryFile, MachOBinaryFile, and Win32BinaryFile. Definition at line 204 of file BinaryFile.h. Referenced by Prog::getFloatConstant(), and Prog::readNativeFloat8(). |
|
Implemented in BinaryFileStub, DOS4GWBinaryFile, ElfBinaryFile, ExeBinaryFile, HpSomBinaryFile, MachOBinaryFile, PalmBinaryFile, and Win32BinaryFile. Referenced by BinaryFileFactory::Load(). |
|
Reimplemented in DOS4GWBinaryFile, ElfBinaryFile, HpSomBinaryFile, MachOBinaryFile, PalmBinaryFile, and Win32BinaryFile. Definition at line 109 of file BinaryFile.cpp. Referenced by FrontEnd::decode(), FrontEnd::getEntryPoints(), SparcFrontEnd::helperFunc(), PentiumFrontEnd::helperFunc(), Prog::setNewProc(), and Prog::symbolByAddress(). |
|
Implemented in BinaryFileStub, DOS4GWBinaryFile, ElfBinaryFile, ExeBinaryFile, HpSomBinaryFile, MachOBinaryFile, PalmBinaryFile, and Win32BinaryFile. Referenced by RtlTest::testIsCompare(), LoaderTest::testPentiumLoad(), and LoaderTest::testSparcLoad(). |
|
Definition at line 146 of file BinaryFile.h. |
|
Definition at line 147 of file BinaryFile.h. |
|
Definition at line 303 of file BinaryFile.h. Referenced by getTextLimits(). |
|
Definition at line 302 of file BinaryFile.h. Referenced by getTextLimits(). |
|
Definition at line 294 of file BinaryFile.h. Referenced by BinaryFile(), and ElfBinaryFile::RealLoad(). |
|
|
|
Definition at line 297 of file BinaryFile.h. Referenced by ExeBinaryFile::RealLoad(). |
|
Definition at line 298 of file BinaryFile.h. Referenced by ExeBinaryFile::RealLoad(). |
|
Definition at line 307 of file BinaryFile.h. Referenced by getTextLimits(). |