Package ghidra.app.util.bin.format.xcoff
Class XCoffOptionalHeader
java.lang.Object
ghidra.app.util.bin.format.xcoff.XCoffOptionalHeader
- All Implemented Interfaces:
StructConverter
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte
Returns the CPU bit flags.byte
Reserved.long
Returns the virtual address of the .data section.long
This field should be 0.long
getEntry()
Returns the virtual address of the entry point.byte
getFlags()
This field consists of 4 1-bit flags and a 4-bit .tdata alignment.long
Returns the size (in bytes) of the raw data for the .data section.short
getMagic()
Returns the magic value.short
Returns log (base-2) of the maximum alignment needed for any csect in the .data or .bss section.short
Returns log (base-2) of the maximum alignment needed for any csect in the .text section.long
Returns the maximum data size allowed for this executable.long
Returns the maximum stack size allowed for this executable.Returns the module type.short
Returns the number of the .bss section.short
Returns the number of the .data section.short
Returns the number of the section that contains the entry point.short
Returns the number of the section that contains the system loader information.short
short
short
Returns the number of the .text section.short
Returns the number of the section that contains the TOC.long
Returns the size (in bytes) of the raw data for the .text section.long
Returns the virtual address of the .text section.long
getTOC()
Returns the virtual address of the TOC anchor.long
Returns the size (in bytes) of the .bss section.short
Returns the format version for this auxiliary header.Returns a structure datatype representing the contents of the implementor of this interface.toString()
-
Field Details
-
AOUTHDRSZ
public static final int AOUTHDRSZ- See Also:
-
-
Method Details
-
toString
-
getMagic
public short getMagic()Returns the magic value. The binder assigns the following value: 0x010b.- Returns:
- the magic value
-
getVersionStamp
public short getVersionStamp()Returns the format version for this auxiliary header. The only valid value is 1.- Returns:
- the format version for this auxiliary header
-
getTextSize
public long getTextSize()Returns the size (in bytes) of the raw data for the .text section.- Returns:
- the size (in bytes) of the raw data for the .text section
-
getInitializedDataSize
public long getInitializedDataSize()Returns the size (in bytes) of the raw data for the .data section.- Returns:
- the size (in bytes) of the raw data for the .data section
-
getUninitializedDataSize
public long getUninitializedDataSize()Returns the size (in bytes) of the .bss section. No raw data exists in the file for the .bss section.- Returns:
- the size (in bytes) of the .bss section
-
getEntry
public long getEntry()Returns the virtual address of the entry point.- Returns:
- the virtual address of the entry point
-
getTextStart
public long getTextStart()Returns the virtual address of the .text section.- Returns:
- the virtual address of the .text section
-
getDataStart
public long getDataStart()Returns the virtual address of the .data section.- Returns:
- the virtual address of the .data section
-
getTOC
public long getTOC()Returns the virtual address of the TOC anchor.- Returns:
- the virtual address of the TOC anchor
-
getSectionNumberForEntry
public short getSectionNumberForEntry()Returns the number of the section that contains the entry point. The entry point must be in the .text or .data section.- Returns:
- the number of the section that contains the entry point
-
getSectionNumberForText
public short getSectionNumberForText()Returns the number of the .text section.- Returns:
- the number of the .text section
-
getSectionNumberForData
public short getSectionNumberForData()Returns the number of the .data section.- Returns:
- the number of the .data section
-
getSectionNumberForTOC
public short getSectionNumberForTOC()Returns the number of the section that contains the TOC.- Returns:
- the number of the section that contains the TOC
-
getSectionNumberForLoader
public short getSectionNumberForLoader()Returns the number of the section that contains the system loader information.- Returns:
- the number of the section that contains the system loader information
-
getSectionNumberForBss
public short getSectionNumberForBss()Returns the number of the .bss section.- Returns:
- the number of the .bss section
-
getMaxAlignmentForText
public short getMaxAlignmentForText()Returns log (base-2) of the maximum alignment needed for any csect in the .text section.- Returns:
- the maximum alignment for the .text section
-
getMaxAlignmentForData
public short getMaxAlignmentForData()Returns log (base-2) of the maximum alignment needed for any csect in the .data or .bss section.- Returns:
- the maximum alignment for the .data or .bss section
-
getModuleType
Returns the module type. Valid module types: RO - Specifies a read-only module.- Returns:
- the module type
-
getCpuFlag
public byte getCpuFlag()Returns the CPU bit flags.- Returns:
- the CPU bit flags
-
getCpuType
public byte getCpuType()Reserved. Always returns 0.- Returns:
- always returns 0
-
getMaxStackSize
public long getMaxStackSize()Returns the maximum stack size allowed for this executable. If the value is 0, then the default value is used.- Returns:
- the maximum stack size allow for this executable
-
getMaxDataSize
public long getMaxDataSize()Returns the maximum data size allowed for this executable. If the value is 0, then the default value is used.- Returns:
- the maximum data size allow for this executable
-
getDebugger
public long getDebugger()This field should be 0. When the loaded program is being debugged, the memory image of this field may be modified by the debugger to insert a trap instruction.- Returns:
- should return 0
-
getFlags
public byte getFlags()This field consists of 4 1-bit flags and a 4-bit .tdata alignment.- Returns:
- the flags
-
getSectionNumberForTData
public short getSectionNumberForTData() -
getSectionNumberForTBss
public short getSectionNumberForTBss() -
toDataType
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 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:
-