Class PEGoBuildId

java.lang.Object
ghidra.app.util.bin.format.golang.PEGoBuildId
All Implemented Interfaces:
ElfInfoItem

public class PEGoBuildId extends Object implements ElfInfoItem
Similar to NoteGoBuildId, but re-implemented here because of the different serialization used in PE binaries. (the logic about the buildid payload is trivial so there is no worry about duplicating code)

  • Constructor Details

    • PEGoBuildId

      public PEGoBuildId(String buildId)
  • Method Details

    • findBuildId

      public static ElfInfoItem.ItemWithAddress<PEGoBuildId> findBuildId(Program program)
    • read

      public static PEGoBuildId read(BinaryReader br, Program program_notused)
      Attempts to read a PEGoBuildId from the specified stream.
      Parameters:
      br - BinaryReader stream (typically the beginning of the ".text" section)
      program_notused - not used, but needed to match functional interface
      Returns:
      PEGoBuildId instance, or null if not present
    • read

      public static PEGoBuildId read(InputStream is)
      Attempts to read a PEGoBuildId from the specified InputStream (useful for early compiler detection before file is loaded).
      Parameters:
      is - InputStream providing access to the ".text" section of a PE binary
      Returns:
      PEGoBuildId instance, or null if not present
    • getBuildId

      public String getBuildId()
    • 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
      Parameters:
      program - Program to markup
      address - Address of the item in the program