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

# Class ElfComment

java.lang.Object
ghidra.app.util.bin.format.elf.info.ElfComment

All Implemented Interfaces:
  `ElfInfoItem`

public class ElfComment extends Object implements ElfInfoItem
An Elf section that contains null-terminated strings, typically added by the compiler to the binary

- ## Nested Class Summary

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ElfComment(List<String> commentStrings, List<Integer> commentStringLengths)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ElfComment`
  `fromProgram(Program program)`
  Reads an ElfComment from the standard ".comment" section in the specified Program.
  `List<String>`
  `getCommentStrings()`
  `void`
  `markupProgram(Program program, Address address)`
  Markup a program's info and memory with this item.
  `static ElfComment`
  `read(BinaryReader br, Program program)`
  Reads a ElfComment from the specified BinaryReader.
  `String`
  `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

  - ### ElfComment

    public ElfComment(List<String> commentStrings, List<Integer> commentStringLengths)

- ## Method Details

  - ### fromProgram

    public static ElfComment fromProgram(Program program)
    Reads an ElfComment from the standard ".comment" section in the specified Program.
    Parameters:
      `program` - Program to read from
    Returns:
      new instance, or null if not found or data error

  - ### read

    public static ElfComment read(BinaryReader br, Program program)
    Reads a ElfComment from the specified BinaryReader.
    Parameters:
      `br` - BinaryReader to read from
      `program` - unused, present to match the signature of `ElfInfoItem.ReaderFunc`
    Returns:
      new instance, or null if data error

  - ### getCommentStrings

    public List<String> getCommentStrings()

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

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`