public interface

ILoaderInformation

com.pnfsoftware.jeb.core.units.codeobject.ILoaderInformation
Known Indirect Subclasses

Class Overview

Basic information held within a code loader unit.

Summary

Constants
int FLAG_HAS_RELOCATION The file contains relocation information.
int FLAG_HAS_SYMBOLS The file contains symbolic information.
int FLAG_IS_RELOCATABLE The file can be relocated at different base addresses.
int FLAG_LIBRARY_FILE The file is a library file (eg, Windows DLL, Linux SO)
int FLAG_OBJECT_FILE The file is an object file (e.g.
int FLAG_PURE_CODE The file is a pseudo-object file, and contains pure code.
Public Methods
abstract long getCompilationTimestamp()
Get the compilation timestamp, if any.
abstract Endianness getEndianness()
Get the endianness.
abstract long getEntryPoint()
Get the relative address of the main entry-point, if any.
abstract int getFlags()
Get generic flags, any combination of FLAG_*.
abstract long getImageBase()
Get the ideal in-memory base address of the file.
abstract long getImageSize()
Get the in-memory size of the file.
abstract String getNotes()
Retrieve custom notes provided by the code object parser.
abstract long getOverlayOffset()
Get the file offset to the overlay (also called 'appended') data in this code object, if any.
abstract ProcessorType getTargetProcessor()
Get the target processor type.
abstract SubsystemType getTargetSubsystem()
Get the target subsystem and/or operating system type.
abstract String getVersion()
Get a version information string about the code object.
abstract int getWordSize()
Get the machine word size, in bits.

Constants

public static final int FLAG_HAS_RELOCATION

The file contains relocation information.

Constant Value: 2 (0x00000002)

public static final int FLAG_HAS_SYMBOLS

The file contains symbolic information.

Constant Value: 1 (0x00000001)

public static final int FLAG_IS_RELOCATABLE

The 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).

Constant Value: 32 (0x00000020)

public static final int FLAG_LIBRARY_FILE

The file is a library file (eg, Windows DLL, Linux SO)

Constant Value: 4 (0x00000004)

public static final int FLAG_OBJECT_FILE

The file is an object file (e.g. Windows COFF, Linux relocatable ELF)

Constant Value: 8 (0x00000008)

public static final int FLAG_PURE_CODE

The 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.

Constant Value: 16 (0x00000010)

Public Methods

public abstract long getCompilationTimestamp ()

Get the compilation timestamp, if any.

Returns
  • epoch timestamp in milliseconds

public abstract Endianness getEndianness ()

Get the endianness.

public abstract 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

public abstract int getFlags ()

Get generic flags, any combination of FLAG_*. The flags are mostly informative.

Returns
  • the optional flags

public abstract 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

public abstract 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

public abstract String getNotes ()

Retrieve custom notes provided by the code object parser.

Returns
  • may be null

public abstract 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

public abstract ProcessorType getTargetProcessor ()

Get the target processor type.

public abstract SubsystemType getTargetSubsystem ()

Get the target subsystem and/or operating system type.

public abstract String getVersion ()

Get a version information string about the code object.

public abstract int getWordSize ()

Get the machine word size, in bits. May be redundant with getTargetProcessor().

Returns
  • word size; common WS include 32-bit and 64-bit