Package ghidra.app.util.bin.format.som

# Class SomDynamicLoaderHeader

java.lang.Object
ghidra.app.util.bin.format.som.SomDynamicLoaderHeader

All Implemented Interfaces:
  `StructConverter`

public class SomDynamicLoaderHeader extends Object implements StructConverter
Represents a SOM `dl_header` structure

See Also:
  - The 32-bit PA-RISC Run-time Architecture Document

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `SIZE`
  The size in bytes of a `SomDynamicLoaderHeader`

  ### Fields inherited from interface ghidra.app.util.bin.StructConverter

  `ASCII, BYTE, DWORD, IBO32, IBO64, POINTER, QWORD, SLEB128, STRING, ULEB128, UTF16, UTF8, VOID, WORD`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SomDynamicLoaderHeader(Program program, Address textAddr, Address dataAddr)`
  Creates a new `SomDynamicLoaderHeader`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Address`
  `getDataAddress()`
  Returns the `Address` of the "data" space.
  `List<SomDltEntry>`
  `getDlt()`
  Returns the `List` of `DLT entries`.
  `int`
  `getDltCount()`
  Returns the number of entries in the DLT.
  `int`
  `getDltLoc()`
  Returns the offset in the $DATA$ space of the Data Linkage Table.
  `int`
  `getDrelocCount()`
  Returns the number of dynamic relocation records generated.
  `int`
  `getDrelocLoc()`
  Returns the text-relative offset of the dynamic relocation records.
  `List<SomDynamicRelocation>`
  `getDynamicRelocations()`
  Returns the `List` of `dynamic relocation entries`.
  `int`
  `getElaborator()`
  Returns the index into the import table if the elab_ref bit in the flags field is set.
  `int`
  `getEmbeddedPath()`
  Returns the index into the shared library string table.
  `List<SomExportEntryExt>`
  `getExportExtensions()`
  Returns the `List` of `export entry extensions`.
  `int`
  `getExportExtLoc()`
  Returns the text-relative offset of the export extension table.
  `int`
  `getExportListCount()`
  Returns the number of export entries.
  `int`
  `getExportListLoc()`
  Returns the text-relative offset of the export list.
  `List<SomExportEntry>`
  `getExports()`
  Returns the `List` of `export entries`.
  `int`
  `getFastbindListLoc()`
  Returns the text-relative offset of fastbind info.
  `short`
  `getFlags()`
  Returns the flags.
  `int`
  `getHashTableLoc()`
  Returns the text-relative offset of the hash table.
  `int`
  `getHashTableSize()`
  Returns the number of slots used in the hash table.
  `int`
  `getHdrVersion()`
  Returns the version of the DL header.
  `short`
  `getHighwaterMark()`
  Returns the highest version number of any symbol defined in the shared library or in the set of highwater marks of the shared libraries in the shared library list.
  `int`
  `getImportListCount()`
  Returns the number of entries in the import list.
  `int`
  `getImportListLoc()`
  Returns the text-relative offset of the import list.
  `List<SomImportEntry>`
  `getImports()`
  Returns the `List` of `import entries`.
  `int`
  `getInitializer()`
  Returns the index into the import table if the init_ref bit in the flags field is set and the initializer_count field is set 0.
  `int`
  `getInitializerCount()`
  Returns the number of initializers declared.
  `int`
  `getLtptrValue()`
  Returns the data-relative offset of the Linkage Table pointer.
  `int`
  `getModuleCount()`
  Returns the number of modules in the module table.
  `int`
  `getModuleLoc()`
  Returns the text-relative offset of the module table.
  `List<SomModuleEntry>`
  `getModules()`
  Returns the `List` of `module entries`.
  `List<SomPltEntry>`
  `getPlt()`
  Returns the `List` of `PLT entries`.
  `int`
  `getPltCount()`
  Returns the number of entries in the PLT.
  `int`
  `getPltLoc()`
  Returns the offset in the $DATA$ space of the Procedure Linkage Table.
  `int`
  `getShlibListCount()`
  Returns the number of entries in the shared library list.
  `int`
  `getShlibListLoc()`
  Returns the text-relative offset of the shared library list.
  `List<SomShlibListEntry>`
  `getShlibs()`
  Returns the `List` of `shared library entries`.
  `int`
  `getStringTableLoc()`
  Returns the text-relative offset of the string table.
  `int`
  `getStringTableSize()`
  Returns the length of the string table.
  `int`
  `getTdsize()`
  Returns the size of the TSD area.
  `Address`
  `getTextAddress()`
  Returns the `Address` of the "text" space.
  `void`
  `markup(Program program, TaskMonitor monitor)`
  Marks up this header
  `DataType`
  `toDataType()`
  Returns a structure datatype representing the contents of the implementor of this interface.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### SIZE

    public static final int SIZE
    The size in bytes of a `SomDynamicLoaderHeader`
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### SomDynamicLoaderHeader

    public SomDynamicLoaderHeader(Program program, Address textAddr, Address dataAddr) throws IOException
    Creates a new `SomDynamicLoaderHeader`
    Parameters:
      `program` - The `Program`
      `textAddr` - The `Address` of the "text" space
      `dataAddr` - The `Address` of the "data" space
    Throws:
      `IOException` - if there was an IO-related error

- ## Method Details

  - ### getHdrVersion

    public int getHdrVersion()
    Returns the version of the DL header.
    Returns:
      the version of the DL header

  - ### getLtptrValue

    public int getLtptrValue()
    Returns the data-relative offset of the Linkage Table pointer.
    Returns:
      the data-relative offset of the Linkage Table pointer

  - ### getShlibListLoc

    public int getShlibListLoc()
    Returns the text-relative offset of the shared library list.
    Returns:
      the text-relative offset of the shared library list

  - ### getShlibListCount

    public int getShlibListCount()
    Returns the number of entries in the shared library list.
    Returns:
      the number of entries in the shared library list

  - ### getImportListLoc

    public int getImportListLoc()
    Returns the text-relative offset of the import list.
    Returns:
      the text-relative offset of the import list

  - ### getImportListCount

    public int getImportListCount()
    Returns the number of entries in the import list.
    Returns:
      the number of entries in the import list

  - ### getHashTableLoc

    public int getHashTableLoc()
    Returns the text-relative offset of the hash table.
    Returns:
      the text-relative offset of the hash table

  - ### getHashTableSize

    public int getHashTableSize()
    Returns the number of slots used in the hash table.
    Returns:
      the number of slots used in the hash table

  - ### getExportListLoc

    public int getExportListLoc()
    Returns the text-relative offset of the export list.
    Returns:
      the text-relative offset of the export list

  - ### getExportListCount

    public int getExportListCount()
    Returns the number of export entries.
    Returns:
      the number of export entries

  - ### getStringTableLoc

    public int getStringTableLoc()
    Returns the text-relative offset of the string table.
    Returns:
      the text-relative offset of the string table

  - ### getStringTableSize

    public int getStringTableSize()
    Returns the length of the string table.
    Returns:
      the length of the string table

  - ### getDrelocLoc

    public int getDrelocLoc()
    Returns the text-relative offset of the dynamic relocation records.
    Returns:
      the text-relative offset of the dynamic relocation records

  - ### getDrelocCount

    public int getDrelocCount()
    Returns the number of dynamic relocation records generated.
    Returns:
      the number of dynamic relocation records generated

  - ### getDltLoc

    public int getDltLoc()
    Returns the offset in the $DATA$ space of the Data Linkage Table.
    Returns:
      the offset in the $DATA$ space of the Data Linkage Table

  - ### getPltLoc

    public int getPltLoc()
    Returns the offset in the $DATA$ space of the Procedure Linkage Table.
    Returns:
      the offset in the $DATA$ space of the Procedure Linkage Table

  - ### getDltCount

    public int getDltCount()
    Returns the number of entries in the DLT.
    Returns:
      the number of entries in the DLT

  - ### getPltCount

    public int getPltCount()
    Returns the number of entries in the PLT.
    Returns:
      the number of entries in the PLT

  - ### getHighwaterMark

    public short getHighwaterMark()
    Returns the highest version number of any symbol defined in the shared library or in the set of highwater marks of the shared libraries in the shared library list.
    Returns:
      the highest version number of any symbol defined in the shared library or in the set of highwater marks of the shared libraries in the shared library list

  - ### getFlags

    public short getFlags()
    Returns the flags.
    Returns:
      the flags

  - ### getExportExtLoc

    public int getExportExtLoc()
    Returns the text-relative offset of the export extension table.
    Returns:
      the text-relative offset of the export extension table

  - ### getModuleLoc

    public int getModuleLoc()
    Returns the text-relative offset of the module table.
    Returns:
      the text-relative offset of the module table

  - ### getModuleCount

    public int getModuleCount()
    Returns the number of modules in the module table.
    Returns:
      the number of modules in the module table

  - ### getElaborator

    public int getElaborator()
    Returns the index into the import table if the elab_ref bit in the flags field is set.
    Returns:
      the index into the import table if the elab_ref bit in the flags field is set

  - ### getInitializer

    public int getInitializer()
    Returns the index into the import table if the init_ref bit in the flags field is set and the initializer_count field is set 0.
    Returns:
      the index into the import table if the init_ref bit in the flags field is set and the initializer_count field is set 0

  - ### getEmbeddedPath

    public int getEmbeddedPath()
    Returns the index into the shared library string table.
    Returns:
      the index into the shared library string table

  - ### getInitializerCount

    public int getInitializerCount()
    Returns the number of initializers declared.
    Returns:
      the number of initializers declared

  - ### getTdsize

    public int getTdsize()
    Returns the size of the TSD area.
    Returns:
      the size of the TSD area

  - ### getFastbindListLoc

    public int getFastbindListLoc()
    Returns the text-relative offset of fastbind info.
    Returns:
      the text-relative offset of fastbind info

  - ### getTextAddress

    public Address getTextAddress()
    Returns the `Address` of the "text" space.
    Returns:
      the `Address` of the "text" space

  - ### getDataAddress

    public Address getDataAddress()
    Returns the `Address` of the "data" space.
    Returns:
      the `Address` of the "data" space

  - ### getShlibs

    public List<SomShlibListEntry> getShlibs()
    Returns the `List` of `shared library entries`.
    Returns:
      the `List` of `shared library entries`

  - ### getImports

    public List<SomImportEntry> getImports()
    Returns the `List` of `import entries`.
    Returns:
      the `List` of `import entries`

  - ### getExports

    public List<SomExportEntry> getExports()
    Returns the `List` of `export entries`.
    Returns:
      the `List` of `export entries`

  - ### getDynamicRelocations

    public List<SomDynamicRelocation> getDynamicRelocations()
    Returns the `List` of `dynamic relocation entries`.
    Returns:
      the `List` of `dynamic relocation entries`

  - ### getPlt

    public List<SomPltEntry> getPlt()
    Returns the `List` of `PLT entries`.
    Returns:
      the `List` of `PLT entries`

  - ### getDlt

    public List<SomDltEntry> getDlt()
    Returns the `List` of `DLT entries`.
    Returns:
      the `List` of `DLT entries`

  - ### getExportExtensions

    public List<SomExportEntryExt> getExportExtensions()
    Returns the `List` of `export entry extensions`.
    Returns:
      the `List` of `export entry extensions`

  - ### getModules

    public List<SomModuleEntry> getModules()
    Returns the `List` of `module entries`.
    Returns:
      the `List` of `module entries`

  - ### markup

    public void markup(Program program, TaskMonitor monitor) throws Exception
    Marks up this header
    Parameters:
      `program` - The `Program`
      `monitor` - A cancellable monitor
    Throws:
      `Exception` - if there was a problem during markup

  - ### toDataType

    public DataType toDataType() throws DuplicateNameException, IOException
    Description copied from interface: `StructConverter`
    Returns a structure datatype representing the contents of the implementor of this interface.

    For example, given:

         class A {
             int foo;
             double bar;
         }

    The return value should be a structure data type with two data type components; an INT and a DOUBLE. The structure should contain field names and, if possible, field comments.

    Specified by:
      `toDataType` in interface `StructConverter`
    Returns:
      returns a structure datatype representing the implementor of this interface
    Throws:
      `DuplicateNameException` - when a datatype of the same name already exists
      `IOException` - if an IO-related error occurs
    See Also:
      - `StructureDataType`