Interface ILoaderInformation
- All Known Implementing Classes:
LoaderInformation
Basic information held within a code loader unit.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The file contains relocation information.static final int
The file contains symbolic information.static final int
The file can be relocated at different base addresses.static final int
The file is a library file (eg, Windows DLL, Linux SO)static final int
The file is an object file (e.g.static final int
The file is a pseudo-object file, and contains pure code. -
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.
-
Field Details
-
FLAG_HAS_SYMBOLS
static final int FLAG_HAS_SYMBOLSThe file contains symbolic information.- See Also:
-
FLAG_HAS_RELOCATION
static final int FLAG_HAS_RELOCATIONThe file contains relocation information.- See Also:
-
FLAG_LIBRARY_FILE
static final int FLAG_LIBRARY_FILEThe file is a library file (eg, Windows DLL, Linux SO)- See Also:
-
FLAG_OBJECT_FILE
static final int FLAG_OBJECT_FILEThe file is an object file (e.g. Windows COFF, Linux relocatable ELF)- See Also:
-
FLAG_PURE_CODE
static final int FLAG_PURE_CODEThe file is a pseudo-object file, and contains pure code. An entry-point RVA of 0 will not be disregarded; ie, if 0, the first code to be executed will be assumed to be at offset 0.- See Also:
-
FLAG_IS_RELOCATABLE
static final int FLAG_IS_RELOCATABLEThe file can be relocated at different base addresses.Note that a file can be relocatable even if it does not have relocation information (eg, PIC).
- See Also:
-
-
Method Details
-
getFlags
int getFlags()Get generic flags, any combination ofFLAG_*
. The flags are mostly informative.- Returns:
- the optional flags
-
getVersion
String getVersion()Get a version information string about the code object.- Returns:
-
getTargetProcessor
ProcessorType getTargetProcessor()Get the target processor type.- Returns:
-
getTargetSubsystem
SubsystemType getTargetSubsystem()Get the target subsystem and/or operating system type.- Returns:
-
getEndianness
Endianness getEndianness()Get the endianness.- Returns:
-
getWordSize
int getWordSize()Get the machine word size, in bits. May be redundant withgetTargetProcessor()
.- Returns:
- word size; common WS include 32-bit and 64-bit
-
getCompilationTimestamp
long getCompilationTimestamp()Get the compilation timestamp, if any.- Returns:
- epoch timestamp in milliseconds
-
getImageBase
long getImageBase()Get the ideal in-memory base address of the file. It is the address of the first byte of the mapped file in memory.- Returns:
- absolute address in bytes
-
getImageSize
long getImageSize()Get the in-memory size of the file. It is the address of the loaded or memory-mapped loader file.- Returns:
- size in bytes
-
getEntryPoint
long getEntryPoint()Get the relative address of the main entry-point, if any.Other exported addresses and symbols are defined within
ICodeObjectUnit
.- Returns:
- the relative (to the base address) address of the main entry-point
-
getOverlayOffset
long getOverlayOffset()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.- 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
String getNotes()Retrieve custom notes provided by the code object parser.- Returns:
- may be null
-