Class LoaderInformation
java.lang.Object
com.pnfsoftware.jeb.core.units.codeobject.LoaderInformation
- All Implemented Interfaces:
ILoaderInformation
Standard implementation of the
ILoaderInformation
interface, that may be used by parsers
implementing ICodeObjectUnit
.-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface com.pnfsoftware.jeb.core.units.codeobject.ILoaderInformation
FLAG_HAS_RELOCATION, FLAG_HAS_SYMBOLS, FLAG_IS_RELOCATABLE, FLAG_LIBRARY_FILE, FLAG_OBJECT_FILE, FLAG_PURE_CODE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
Get the compilation timestamp, if any.Get the endianness.long
Get the relative address of the main entry-point, if any.int
getFlags()
Get generic flags, any combination ofFLAG_*
.long
Get the ideal in-memory base address of the file.long
Get the in-memory size of the file.getNotes()
Retrieve custom notes provided by the code object parser.long
Get the file offset to the overlay (also called 'appended') data in this code object, if any.Get the target processor type.Get the target subsystem and/or operating system type.Get a version information string about the code object.int
Get the machine word size, in bits.toString()
-
Constructor Details
-
LoaderInformation
public LoaderInformation()Refer to the builder helper class.
-
-
Method Details
-
getFlags
public int getFlags()Description copied from interface:ILoaderInformation
Get generic flags, any combination ofFLAG_*
. The flags are mostly informative.- Specified by:
getFlags
in interfaceILoaderInformation
- Returns:
- the optional flags
-
getVersion
Description copied from interface:ILoaderInformation
Get a version information string about the code object.- Specified by:
getVersion
in interfaceILoaderInformation
- Returns:
-
getTargetProcessor
Description copied from interface:ILoaderInformation
Get the target processor type.- Specified by:
getTargetProcessor
in interfaceILoaderInformation
- Returns:
-
getTargetSubsystem
Description copied from interface:ILoaderInformation
Get the target subsystem and/or operating system type.- Specified by:
getTargetSubsystem
in interfaceILoaderInformation
- Returns:
-
getEndianness
Description copied from interface:ILoaderInformation
Get the endianness.- Specified by:
getEndianness
in interfaceILoaderInformation
- Returns:
-
getWordSize
public int getWordSize()Description copied from interface:ILoaderInformation
Get the machine word size, in bits. May be redundant withILoaderInformation.getTargetProcessor()
.- Specified by:
getWordSize
in interfaceILoaderInformation
- Returns:
- word size; common WS include 32-bit and 64-bit
-
getCompilationTimestamp
public long getCompilationTimestamp()Description copied from interface:ILoaderInformation
Get the compilation timestamp, if any.- Specified by:
getCompilationTimestamp
in interfaceILoaderInformation
- Returns:
- epoch timestamp in milliseconds
-
getImageBase
public long getImageBase()Description copied from interface:ILoaderInformation
Get the ideal in-memory base address of the file. It is the address of the first byte of the mapped file in memory.- Specified by:
getImageBase
in interfaceILoaderInformation
- Returns:
- absolute address in bytes
-
getImageSize
public long getImageSize()Description copied from interface:ILoaderInformation
Get the in-memory size of the file. It is the address of the loaded or memory-mapped loader file.- Specified by:
getImageSize
in interfaceILoaderInformation
- Returns:
- size in bytes
-
getEntryPoint
public long getEntryPoint()Description copied from interface:ILoaderInformation
Get the relative address of the main entry-point, if any.Other exported addresses and symbols are defined within
ICodeObjectUnit
.- Specified by:
getEntryPoint
in interfaceILoaderInformation
- Returns:
- the relative (to the base address) address of the main entry-point
-
getOverlayOffset
public long getOverlayOffset()Description copied from interface:ILoaderInformation
Get the file offset to the overlay (also called 'appended') data in this code object, if any. Overlay data, although part of a binary file, is normally not mapped to memory by the code object loaders.- Specified by:
getOverlayOffset
in interfaceILoaderInformation
- Returns:
- the overlay data offset in file, 0 if none or N/A. A code object without overlay data may also return a value equal to the input size itself
-
getNotes
Description copied from interface:ILoaderInformation
Retrieve custom notes provided by the code object parser.- Specified by:
getNotes
in interfaceILoaderInformation
- Returns:
- may be null
-
toString
-