Package ghidra.app.util.bin.format.elf.info

# Class NoteGnuProperty

java.lang.Object
ghidra.app.util.bin.format.elf.info.ElfNote
ghidra.app.util.bin.format.elf.info.NoteGnuProperty

All Implemented Interfaces:
  `ElfInfoItem`

public class NoteGnuProperty extends ElfNote
An ELF note that contains a list of enumerated "properties".

Currently known property types are stack_size and no_copy_on_protected (flag).

      array of Elf_Prop {
        word pr_type;
        word pr_datasz;
        byte pr_data[pr_datasz];
        byte padding[]
      }

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final record`
  `NoteGnuProperty.NotePropertyElement`
  Contains the information of an individual note property.

  ## Nested classes/interfaces inherited from class ghidra.app.util.bin.format.elf.info.ElfNote

  `ElfNote.NoteReaderFunc<T extends ElfNote>`

  ## Nested classes/interfaces inherited from interface ghidra.app.util.bin.format.elf.info.ElfInfoItem

  `ElfInfoItem.ItemWithAddress<T>, ElfInfoItem.ReaderFunc<T>`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `SECTION_NAME`

  ### Fields inherited from class ghidra.app.util.bin.format.elf.info.ElfNote

  `description, name, nameLen, vendorType`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NoteGnuProperty(int nameLen, String name, int vendorType, List<NoteGnuProperty.NotePropertyElement> elements)`
  Creates a instance using the specified values.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `decorateProgramInfo(Options programInfoOptions)`
  Adds a single entry to the Options, built from the `ElfNote.getProgramInfoKey()` value and `ElfNote.getNoteValueString()` value.
  `static NoteGnuProperty`
  `fromProgram(Program program)`
  Returns a NoteGnuProperty instance containing the information found in the program's ".note.gnu.property" section, or null if there is no section.
  `String`
  `getNoteTypeName()`
  Returns a string that describes this note's type, used when creating the default `ElfNote.getProgramInfoKey()` value.
  `void`
  `markupProgram(Program program, Address address)`
  Markup a program's info and memory with this item.
  `static NoteGnuProperty`
  `read(ElfNote note, Program program)`
  Parses a NoteGnuProperty instance from the specified generic note.
  `StructureDataType`
  `toStructure(DataTypeManager dtm)`
  Returns a Structure datatype that matches the format of this ElfNote, or null if this ElfNote shouldn't be represented/marked up.

  ### Methods inherited from class ghidra.app.util.bin.format.elf.info.ElfNote

  `createNoteStructure, getDescription, getDescriptionAsHexString, getDescriptionLen, getDescriptionReader, getName, getNameLen, getNoteValueString, getProgramInfoKey, getVendorType, isGnu, read, readFromProgramHelper, toString`

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

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

- ## Field Details

  - ### SECTION_NAME

    public static final String SECTION_NAME
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### NoteGnuProperty

    public NoteGnuProperty(int nameLen, String name, int vendorType, List<NoteGnuProperty.NotePropertyElement> elements)
    Creates a instance using the specified values.
    Parameters:
      `name` - name of property
      `vendorType` - vendor type of property
      `elements` - list of NotePropertyElements

- ## Method Details

  - ### read

    public static NoteGnuProperty read(ElfNote note, Program program) throws IOException
    Parses a NoteGnuProperty instance from the specified generic note.
    Parameters:
      `note` - generic note that contains the data from a .note.gnu.property section
      `program` - Program that contains the note section
    Returns:
      `NoteGnuProperty` instance
    Throws:
      `IOException` - if IO error parsing data

  - ### fromProgram

    public static NoteGnuProperty fromProgram(Program program)
    Returns a NoteGnuProperty instance containing the information found in the program's ".note.gnu.property" section, or null if there is no section.
    Parameters:
      `program` - `Program` to read from
    Returns:
      `NoteGnuProperty`

  - ### getNoteTypeName

    public String getNoteTypeName()
    Description copied from class: `ElfNote`
    Returns a string that describes this note's type, used when creating the default `ElfNote.getProgramInfoKey()` value.

    Specific Note subclasses can override this to return a better string than this default implementation, or can override the `ElfNote.getProgramInfoKey()` method.

    Overrides:
      `getNoteTypeName` in class `ElfNote`
    Returns:
      descriptive string

  - ### decorateProgramInfo

    public void decorateProgramInfo(Options programInfoOptions)
    Description copied from class: `ElfNote`
    Adds a single entry to the Options, built from the `ElfNote.getProgramInfoKey()` value and `ElfNote.getNoteValueString()` value.
    Overrides:
      `decorateProgramInfo` in class `ElfNote`
    Parameters:
      `programInfoOptions` - `Options` to add entry to

  - ### markupProgram

    public void markupProgram(Program program, Address address)
    Description copied from interface: `ElfInfoItem`
    Markup a program's info and memory with this item.
    Specified by:
      `markupProgram` in interface `ElfInfoItem`
    Overrides:
      `markupProgram` in class `ElfNote`
    Parameters:
      `program` - `Program` to markup
      `address` - `Address` of the item in the program

  - ### toStructure

    public StructureDataType toStructure(DataTypeManager dtm)
    Description copied from class: `ElfNote`
    Returns a Structure datatype that matches the format of this ElfNote, or null if this ElfNote shouldn't be represented/marked up.
    Overrides:
      `toStructure` in class `ElfNote`
    Parameters:
      `dtm` - `DataTypeManager` that will receive the structure
    Returns:
      StructureDataType that specifies the layout of the ElfNote, or null