Class NoteGoBuildId

java.lang.Object
ghidra.app.util.bin.format.elf.info.ElfNote
ghidra.app.util.bin.format.golang.NoteGoBuildId
All Implemented Interfaces:
ElfInfoItem

public class NoteGoBuildId extends ElfNote
An ELF note that specifies the golang build-id.
  • Field Details

  • Constructor Details

    • NoteGoBuildId

      public NoteGoBuildId(int nameLen, String name, int vendorType, byte[] description)
  • Method Details

    • read

      public static NoteGoBuildId read(BinaryReader br, Program unusedProgram) throws IOException
      Reads a NoteGoBuildId from the specified BinaryReader, matching the signature of ElfInfoItem.ReaderFunc.
      Parameters:
      br - BinaryReader
      unusedProgram - context (unused but needed to match signature)
      Returns:
      new NoteGoBuildId instance, never null
      Throws:
      IOException - if data error
    • getBuildId

      public String getBuildId()
      Returns the go buildid value
      Returns:
      go buildid value
    • 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
    • getProgramInfoKey

      public String getProgramInfoKey()
      Description copied from class: ElfNote
      Returns a string that is used to build a PROGRAM_INFO entry's key.

      Specific Note subclasses can override this to return a better key string.

      Overrides:
      getProgramInfoKey in class ElfNote
      Returns:
      key string (avoid using '.' characters as they will be converted to '_'s)
    • getNoteValueString

      public String getNoteValueString()
      Description copied from class: ElfNote
      Returns a string representation of this note's 'value', used when creating the PROGRAM_INFO entry.

      Specific Note subclasses should override this to return a better string than this default implementation.

      Overrides:
      getNoteValueString in class ElfNote
      Returns:
      string describing this note's value
    • 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