Class UnixAoutHeader
java.lang.Object
ghidra.app.util.bin.format.unixaout.UnixAoutHeader
- All Implemented Interfaces:
StructConverter
-
Nested Class Summary
Nested Classes -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionUnixAoutHeader
(ByteProvider provider, boolean isLittleEndian) Interprets binary data as an exec header from a UNIX-style a.out executable, and validates the contained fields. -
Method Summary
Modifier and TypeMethodDescriptionlong
long
Returns the compiler used by this executable. This is left as 'default' for all machine types other than i386, where it is assumed to be gcc..long
long
long
long
long
long
Returns the enumerated type of executable contained in this A.out file..Returns the processor/language specified by this header..long
long
long
long
long
long
long
long
long
boolean
isValid()
Returns an indication of whether this header's fields are all valid; this includes the machine type, executable type, and section offsets..void
Returns a structure datatype representing the contents of the implementor of this interface.
-
Constructor Details
-
UnixAoutHeader
Interprets binary data as an exec header from a UNIX-style a.out executable, and validates the contained fields.- Parameters:
provider
- Source of header binary dataisLittleEndian
- Flag indicating whether to interpret the data as little-endian.- Throws:
IOException
- if an IO-related error occurred
-
-
Method Details
-
getReader
-
getLanguageSpec
Returns the processor/language specified by this header..- Returns:
- the processor/language specified by this header.
-
getCompilerSpec
Returns the compiler used by this executable. This is left as 'default' for all machine types other than i386, where it is assumed to be gcc..- Returns:
- the compiler used by this executable. This is left as 'default' for all machine types other than i386, where it is assumed to be gcc.
-
getExecutableType
Returns the enumerated type of executable contained in this A.out file..- Returns:
- the enumerated type of executable contained in this A.out file.
-
isValid
public boolean isValid()Returns an indication of whether this header's fields are all valid; this includes the machine type, executable type, and section offsets..- Returns:
- an indication of whether this header's fields are all valid; this includes the machine type, executable type, and section offsets.
-
getTextSize
public long getTextSize() -
getDataSize
public long getDataSize() -
getBssSize
public long getBssSize() -
getSymSize
public long getSymSize() -
getStrSize
public long getStrSize() -
getEntryPoint
public long getEntryPoint() -
getTextRelocSize
public long getTextRelocSize() -
getDataRelocSize
public long getDataRelocSize() -
getTextOffset
public long getTextOffset() -
getDataOffset
public long getDataOffset() -
getTextRelocOffset
public long getTextRelocOffset() -
getDataRelocOffset
public long getDataRelocOffset() -
getSymOffset
public long getSymOffset() -
getStrOffset
public long getStrOffset() -
getTextAddr
public long getTextAddr() -
getDataAddr
public long getDataAddr() -
getBssAddr
public long getBssAddr() -
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:
-
markup
public void markup(Program program, Address headerAddress) throws CodeUnitInsertionException, DuplicateNameException, IOException
-