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

# Class NoteGnuBuildId

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

All Implemented Interfaces:
  `ElfInfoItem`

public class NoteGnuBuildId extends ElfNote
An ELF note that specifies the build-id (sha1/md5/etc hash or manually specified bytes that can be hex-ified) of the containing program.

The hex values of the build-id are useful to find an external debug file.

- ## Nested Class Summary

  ## 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 extends ElfInfoItem>`

- ## 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
  Modifier
  Constructor
  Description
  `protected`
  `NoteGnuBuildId(int nameLen, String name, int vendorType, byte[] description)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static NoteGnuBuildId`
  `fromProgram(Program program)`
  Reads a NoteGnuBuildId from the standard ".note.gnu.build-id" section in the specified Program.
  `String`
  `getNoteTypeName()`
  Returns a string that describes this note's type, used when creating the default `ElfNote.getProgramInfoKey()` value.
  `static NoteGnuBuildId`
  `read(ElfNote note, Program program)`
  Deserializes a NoteGnuBuildId from an already read 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, decorateProgramInfo, getDescription, getDescriptionAsHexString, getDescriptionLen, getDescriptionReader, getName, getNameLen, getNoteValueString, getProgramInfoKey, getVendorType, isGnu, markupProgram, 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

  - ### NoteGnuBuildId

    protected NoteGnuBuildId(int nameLen, String name, int vendorType, byte[] description)

- ## Method Details

  - ### read

    public static NoteGnuBuildId read(ElfNote note, Program program) throws IOException
    Deserializes a NoteGnuBuildId from an already read generic Note.
    Parameters:
      `note` - generic Note
      `program` - context
    Returns:
      new NoteGnuBuildId instance, never null
    Throws:
      `IOException` - if data error

  - ### fromProgram

    public static NoteGnuBuildId fromProgram(Program program)
    Reads a NoteGnuBuildId from the standard ".note.gnu.build-id" section in the specified Program.
    Parameters:
      `program` - Program to read from
    Returns:
      new instance, or null if not found or data error

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

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