Class TLSDirectory

java.lang.Object
ghidra.app.util.bin.format.pe.TLSDirectory
All Implemented Interfaces:
StructConverter

public class TLSDirectory extends Object implements StructConverter
A class to represent the IMAGE_TLS_DIRECTORY32 and IMAGE_TLS_DIRECTORY64 data structures.
typedef struct _IMAGE_TLS_DIRECTORY32 {
    DWORD   StartAddressOfRawData;
    DWORD   EndAddressOfRawData;
    DWORD   AddressOfIndex;             // PDWORD
    DWORD   AddressOfCallBacks;         // PIMAGE_TLS_CALLBACK *
    DWORD   SizeOfZeroFill;
    DWORD   Characteristics;
} IMAGE_TLS_DIRECTORY32;
typedef IMAGE_TLS_DIRECTORY32 * PIMAGE_TLS_DIRECTORY32;

typedef struct _IMAGE_TLS_DIRECTORY64 {
    ULONGLONG   StartAddressOfRawData;
    ULONGLONG   EndAddressOfRawData;
    PDWORD      AddressOfIndex;
    PIMAGE_TLS_CALLBACK * AddressOfCallBacks;
    DWORD       SizeOfZeroFill;
    DWORD       Characteristics;
} IMAGE_TLS_DIRECTORY64;
typedef IMAGE_TLS_DIRECTORY64 * PIMAGE_TLS_DIRECTORY64;

  • Method Details

    • getStartAddressOfRawData

      public long getStartAddressOfRawData()
      Returns the beginning address of a range of memory used to initialize a new thread's TLS data in memory.
      Returns:
      the beginning address of a range of memory used to initialize a new thread's TLS data in memory.
    • getEndAddressOfRawData

      public long getEndAddressOfRawData()
      Returns the ending address of the range of memory used to initialize a new thread's TLS data in memory.
      Returns:
      the ending address of the range of memory used to initialize a new thread's TLS data in memory.
    • getAddressOfIndex

      public long getAddressOfIndex()
      Returns:
      the index to locate the thread local data.
    • getAddressOfCallBacks

      public long getAddressOfCallBacks()
      Returns:
      the address of an array of PIMAGE_TLS_CALLBACK function pointers
    • getSizeOfZeroFill

      public int getSizeOfZeroFill()
      Returns:
      the size in bytes of the initialization data
    • getCharacteristics

      public int getCharacteristics()
      Reserved, currently set to 0.
      Returns:
      reserved, currently set to 0
    • toDataType

      public DataType toDataType() throws DuplicateNameException
      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
      See Also:
    • getName

      public String getName()
      Returns the name of the structure.
      Returns:
      the name of the structure