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

# Interface ElfInfoItem

All Known Implementing Classes:
  `ElfComment`, `ElfNote`, `GnuDebugLink`, `GoBuildInfo`, `NoteAbiTag`, `NoteGnuBuildId`, `NoteGnuProperty`, `NoteGoBuildId`, `PEGoBuildId`

public interface ElfInfoItem
Interface and helper functions to read and markup things that have been read from an Elf program.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static final record`
  `ElfInfoItem.ItemWithAddress<T>`
  `static interface`
  `ElfInfoItem.ReaderFunc<T extends ElfInfoItem>`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `markupElfInfoItemSection(Program program, String sectionName, ElfInfoItem.ReaderFunc<ElfInfoItem> readFunc)`
  Helper method to markup a program if it contains the specified item in the specified memory section.
  `void`
  `markupProgram(Program program, Address address)`
  Markup a program's info and memory with this item.
  `static <T extends ElfInfoItem>
  ElfInfoItem.ItemWithAddress<T>`
  `readItemFromSection(Program program, String sectionName, ElfInfoItem.ReaderFunc<T> readFunc)`
  Helper method to read an item from a program's memory section.

- ## Method Details

  - ### markupProgram

    void markupProgram(Program program, Address address)
    Markup a program's info and memory with this item.
    Parameters:
      `program` - `Program` to markup
      `address` - `Address` of the item in the program

  - ### markupElfInfoItemSection

    static void markupElfInfoItemSection(Program program, String sectionName, ElfInfoItem.ReaderFunc<ElfInfoItem> readFunc)
    Helper method to markup a program if it contains the specified item in the specified memory section.
    Parameters:
      `program` - `Program`
      `sectionName` - name of memory section that contains the item
      `readFunc` - `ElfInfoItem.ReaderFunc` that will deserialize an instance of the item

  - ### readItemFromSection

    static <T extends ElfInfoItem> ElfInfoItem.ItemWithAddress<T> readItemFromSection(Program program, String sectionName, ElfInfoItem.ReaderFunc<T> readFunc)
    Helper method to read an item from a program's memory section.
    Type Parameters:
      `T` - type of the item that will be read
    Parameters:
      `program` - `Program` to read from
      `sectionName` - name of memory section that contains the item
      `readFunc` - `ElfInfoItem.ReaderFunc` that will deserialize an instance of the item
    Returns:
      a wrapped instance of the item, or null if the memory section does not exist or there was an error while reading the item from the section