Class LoaderInformation

java.lang.Object
com.pnfsoftware.jeb.core.units.codeobject.LoaderInformation
All Implemented Interfaces:
ILoaderInformation

@Ser public class LoaderInformation extends Object implements ILoaderInformation
Standard implementation of the ILoaderInformation interface, that may be used by parsers implementing ICodeObjectUnit.
  • 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 of FLAG_*. The flags are mostly informative.
      Specified by:
      getFlags in interface ILoaderInformation
      Returns:
      the optional flags
    • getVersion

      public String getVersion()
      Description copied from interface: ILoaderInformation
      Get a version information string about the code object.
      Specified by:
      getVersion in interface ILoaderInformation
      Returns:
      optional version string
    • getTargetProcessor

      public ProcessorType getTargetProcessor()
      Description copied from interface: ILoaderInformation
      Get the target processor type.
      Specified by:
      getTargetProcessor in interface ILoaderInformation
      Returns:
      target processor type, or null if unknown
    • getTargetSubsystem

      public SubsystemType getTargetSubsystem()
      Description copied from interface: ILoaderInformation
      Get the target subsystem and/or operating system type.
      Specified by:
      getTargetSubsystem in interface ILoaderInformation
      Returns:
      target subsystem type, or null if unknown
    • getEndianness

      public Endianness getEndianness()
      Description copied from interface: ILoaderInformation
      Get the endianness.
      Specified by:
      getEndianness in interface ILoaderInformation
      Returns:
      byte ordering
    • getWordSize

      public int getWordSize()
      Description copied from interface: ILoaderInformation
      Get the machine word size, in bits. May be redundant with ILoaderInformation.getTargetProcessor().
      Specified by:
      getWordSize in interface ILoaderInformation
      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 interface ILoaderInformation
      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 interface ILoaderInformation
      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 interface ILoaderInformation
      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 interface ILoaderInformation
      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 interface ILoaderInformation
      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

      public String getNotes()
      Description copied from interface: ILoaderInformation
      Retrieve custom notes provided by the code object parser.
      Specified by:
      getNotes in interface ILoaderInformation
      Returns:
      may be null
    • toString

      public String toString()
      Overrides:
      toString in class Object