Package ghidra.app.util.bin.format.pef

# Class ExportedSymbol

java.lang.Object
ghidra.app.util.bin.format.pef.ExportedSymbol

All Implemented Interfaces:
  `StructConverter`

public class ExportedSymbol extends Object
See Apple's -- PEFBinaryFormat.h

     struct PEFExportedSymbol { //! This structure is 10 bytes long and arrays are packed.
         UInt32  classAndName;  //A combination of class and name offset.
         UInt32  symbolValue;   //Typically the symbol's offset within a section.
         SInt16  sectionIndex;  //The index of the section, or pseudo-section, for the symbol.
     };

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `kPEFAbsoluteExport`
  The symbol value is an absolute address.
  `static final int`
  `kPEFExpSymClassShift`
  `static final int`
  `kPEFReexportedImport`
  The symbol value is the index of a reexported import.
  `static final int`
  `kPEFWeakImportSymMask`
  Weak symbol mask

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

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getName()`
  Returns the symbol's name.
  `int`
  `getNameOffset()`
  Returns offset of symbol name in loader string table.
  `short`
  `getSectionIndex()`
  Returns the index of the section, or pseudo-section, for the symbol.
  `SymbolClass`
  `getSymbolClass()`
  Returns the symbol's class.
  `int`
  `getSymbolValue()`
  Typically the symbol's offset within a section.
  `DataType`
  `toDataType()`
  Returns a structure datatype representing the contents of the implementor of this interface.
  `String`
  `toString()`

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

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

- ## Field Details

  - ### kPEFExpSymClassShift

    public static final int kPEFExpSymClassShift
    See Also:
      - Constant Field Values

  - ### kPEFAbsoluteExport

    public static final int kPEFAbsoluteExport
    The symbol value is an absolute address.
    See Also:
      - Constant Field Values

  - ### kPEFReexportedImport

    public static final int kPEFReexportedImport
    The symbol value is the index of a reexported import.
    See Also:
      - Constant Field Values

  - ### kPEFWeakImportSymMask

    public static final int kPEFWeakImportSymMask
    Weak symbol mask
    See Also:
      - Constant Field Values

- ## Method Details

  - ### getName

    public String getName()
    Returns the symbol's name.
    Returns:
      the symbol's name

  - ### getSymbolClass

    public SymbolClass getSymbolClass()
    Returns the symbol's class.
    Returns:
      the symbol's class

  - ### getNameOffset

    public int getNameOffset()
    Returns offset of symbol name in loader string table.
    Returns:
      offset of symbol name in loader string table

  - ### getSymbolValue

    public int getSymbolValue()
    Typically the symbol's offset within a section.
    Returns:
      the symbol's offset within a section

  - ### getSectionIndex

    public short getSectionIndex()
    Returns the index of the section, or pseudo-section, for the symbol.
    Returns:
      the index of the section, or pseudo-section, for the symbol

  - ### 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.

    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`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`