Package ghidra.app.util.bin.format.som
Class SomHeader
java.lang.Object
ghidra.app.util.bin.format.som.SomHeader
- All Implemented Interfaces:
StructConverter
Represents a SOM
header structure- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the auxiliary header location.Returns theListofauxiliary headers.<T> List<T> getAuxHeaders(Class<T> classType) Returns theListofauxiliary headers.longReturns the auxiliary header size.longReturns the checksum.Returns theListofcompilation units.longReturns the location in file of module dictionary.longReturns the number of modules.getDataAddress(Program program) Returns the starting address of the "data" space, ornullif it wasn't found.longReturns the offset of entry point.longReturns the index of space containing entry point.longReturns the index of subspace for entry point.Returns the file time.<T> TgetFirstAuxHeader(Class<T> classType) Returns the first foundauxiliary header.longReturns the location in file of fixup requests.longReturns the number of fixup requests.longReturns the init array location.longReturns the init array total.longReturns the MPE/iX loader fixup location.longReturns the number of loader fixup records.intgetMagic()Returns the magic.longReturns the DP value assumed during compilation.longReturns the length in bytes of entire som.longReturns the location in file of space dictionary.longReturns the file location of string area for space and subspace names.longReturns the size of string area for space and subspace names.longReturns the number of space entries.longReturns the location of subspace entries.longReturns the number of subspace entries.longReturns the location in file of symbol dictionary.longReturns the file location of string area for module and symbol names.longReturns the size of string area for module and symbol names.longReturns the number of symbol records.intReturns the system ID.getTextAddress(Program program) Returns the starting address of the "text" space.longReturns the byte offset of first byte of data for unloadable spaces.longReturns the byte length of data for unloadable spaces.longReturns the version ID.booleanReturns true if thisSomHeaderhas a valid magic number; otherwise false.booleanReturns true if thisSomHeaderhas a valid version ID; otherwise false.voidmarkup(Program program, Address headerAddr, TaskMonitor monitor) Marks up this headerReturns a structure datatype representing the contents of the implementor of this interface.
-
Field Details
-
SIZE
public static final int SIZEThe size in bytes of aSomHeader- See Also:
-
-
Constructor Details
-
SomHeader
Creates a newSomHeader- Parameters:
reader- ABinaryReaderpositioned at the start of the header- Throws:
IOException- if there was an IO-related error
-
-
Method Details
-
getSystemId
public int getSystemId()Returns the system ID.- Returns:
- the system ID
-
getMagic
public int getMagic()Returns the magic.- Returns:
- the magic
-
hasValidMagic
public boolean hasValidMagic()Returns true if thisSomHeaderhas a valid magic number; otherwise false.- Returns:
- true if this
SomHeaderhas a valid magic number; otherwise false
-
getVersionId
public long getVersionId()Returns the version ID.- Returns:
- the version ID
-
hasValidVersionId
public boolean hasValidVersionId()Returns true if thisSomHeaderhas a valid version ID; otherwise false.- Returns:
- true if this
SomHeaderhas a valid version ID; otherwise false
-
getFileType
Returns the file time.- Returns:
- the file time
-
getEntrySpace
public long getEntrySpace()Returns the index of space containing entry point.- Returns:
- the index of space containing entry point
-
getEntrySubspace
public long getEntrySubspace()Returns the index of subspace for entry point.- Returns:
- the index of subspace for entry point
-
getEntryOffset
public long getEntryOffset()Returns the offset of entry point.- Returns:
- the offset of entry point
-
getAuxHeaderLocation
public long getAuxHeaderLocation()Returns the auxiliary header location.- Returns:
- the auxiliary header location
-
getAuxHeaderSize
public long getAuxHeaderSize()Returns the auxiliary header size.- Returns:
- the auxiliary header size
-
getSomLength
public long getSomLength()Returns the length in bytes of entire som.- Returns:
- the length in bytes of entire som
-
getPresumedDp
public long getPresumedDp()Returns the DP value assumed during compilation.- Returns:
- the DP value assumed during compilation
-
getSpaceLocation
public long getSpaceLocation()Returns the location in file of space dictionary.- Returns:
- the location in file of space dictionary
-
getSpaceTotal
public long getSpaceTotal()Returns the number of space entries.- Returns:
- the number of space entries
-
getSubspaceLocation
public long getSubspaceLocation()Returns the location of subspace entries.- Returns:
- the location of subspace entries
-
getSubspaceTotal
public long getSubspaceTotal()Returns the number of subspace entries.- Returns:
- the number of subspace entries
-
getLoaderFixupLocation
public long getLoaderFixupLocation()Returns the MPE/iX loader fixup location.- Returns:
- the MPE/iX loader fixup location
-
getLoaderFixupTotal
public long getLoaderFixupTotal()Returns the number of loader fixup records.- Returns:
- the number of loader fixup records
-
getSpaceStringsLocation
public long getSpaceStringsLocation()Returns the file location of string area for space and subspace names.- Returns:
- the file location of string area for space and subspace names
-
getSpaceStringsSize
public long getSpaceStringsSize()Returns the size of string area for space and subspace names.- Returns:
- the size of string area for space and subspace names
-
getInitArrayLocation
public long getInitArrayLocation()Returns the init array location.- Returns:
- the init array location
-
getInitArrayTotal
public long getInitArrayTotal()Returns the init array total.- Returns:
- the init array total
-
getCompilerLocation
public long getCompilerLocation()Returns the location in file of module dictionary.- Returns:
- the location in file of module dictionary
-
getCompilerTotal
public long getCompilerTotal()Returns the number of modules.- Returns:
- the number of modules
-
getSymbolLocation
public long getSymbolLocation()Returns the location in file of symbol dictionary.- Returns:
- the location in file of symbol dictionary
-
getSymbolTotal
public long getSymbolTotal()Returns the number of symbol records.- Returns:
- the number of symbol records
-
getFixupRequestLocation
public long getFixupRequestLocation()Returns the location in file of fixup requests.- Returns:
- the location in file of fixup requests
-
getFixupRequestTotal
public long getFixupRequestTotal()Returns the number of fixup requests.- Returns:
- the number of fixup requests
-
getSymbolStringsLocation
public long getSymbolStringsLocation()Returns the file location of string area for module and symbol names.- Returns:
- the file location of string area for module and symbol names
-
getSymbolStringsSize
public long getSymbolStringsSize()Returns the size of string area for module and symbol names.- Returns:
- the size of string area for module and symbol names
-
getUnloadableSpLocation
public long getUnloadableSpLocation()Returns the byte offset of first byte of data for unloadable spaces.- Returns:
- the byte offset of first byte of data for unloadable spaces
-
getUnloadableSpSize
public long getUnloadableSpSize()Returns the byte length of data for unloadable spaces.- Returns:
- the byte length of data for unloadable spaces
-
getChecksum
public long getChecksum()Returns the checksum.- Returns:
- the checksum
-
getSpaces
-
getSubspaces
-
getAuxHeaders
Returns theListofauxiliary headers.- Returns:
- the
Listofauxiliary headers
-
getAuxHeaders
Returns theListofauxiliary headers. of the given type}- Type Parameters:
T- The type of auxiliary header to get- Parameters:
classType- The type of auxiliary header to get- Returns:
- the
Listofauxiliary headers
-
getFirstAuxHeader
Returns the first foundauxiliary header. of the given type}- Type Parameters:
T- The type of auxiliary header to get- Parameters:
classType- The type of auxiliary header to get- Returns:
- the first found
auxiliary header
-
getCompilationUnits
Returns theListofcompilation units.- Returns:
- the
Listofcompilation units
-
getSymbols
-
getTextAddress
Returns the starting address of the "text" space. -
getDataAddress
Returns the starting address of the "data" space, ornullif it wasn't found. -
markup
Marks up this header -
toDataType
Description copied from interface:StructConverterReturns 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:
toDataTypein interfaceStructConverter- Returns:
- returns a structure datatype representing the implementor of this interface
- Throws:
DuplicateNameException- when a datatype of the same name already existsIOException- if an IO-related error occurs- See Also:
-