Interface ISegmentInformation

All Known Implementing Classes:
SegmentInformation

@Ser public interface ISegmentInformation
Definition of object code segments and sections.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The segment will be allocated once there is an actual write to it.
    static final int
    The segment or section is executable
    static final int
    The segment or section appears invalid.
    static final int
    The segment or section is readable
    static final int
    Combination flag: R, W
    static final int
    Combination flag: R, W, X
    static final int
    The segment or section is not explicitly defined in the code object file.
    static final int
    The segment or section is writable
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Get the memory alignment within the segment.
    int
    Get the flags for this segment or section.
    Retrieve the name of the segment or section.
    long
    Get the file offset of the segment or section.
    long
    Get the in-memory, base-relative address of the beginning of this segment or section.
    long
    Get the file size of this segment or section.
    long
    Get the in-memory size of this segment or section.
  • Field Details

    • FLAG_WRITE

      static final int FLAG_WRITE
      The segment or section is writable
      See Also:
    • FLAG_READ

      static final int FLAG_READ
      The segment or section is readable
      See Also:
    • FLAG_EXECUTE

      static final int FLAG_EXECUTE
      The segment or section is executable
      See Also:
    • FLAG_RW

      static final int FLAG_RW
      Combination flag: R, W
      See Also:
    • FLAG_RWX

      static final int FLAG_RWX
      Combination flag: R, W, X
      See Also:
    • FLAG_INVALID

      static final int FLAG_INVALID
      The segment or section appears invalid.
      See Also:
    • FLAG_ALLOC_ON_WRITE

      static final int FLAG_ALLOC_ON_WRITE
      The segment will be allocated once there is an actual write to it. Useful for large and initially empty segments.
      See Also:
    • FLAG_SYNTHETIC

      static final int FLAG_SYNTHETIC
      The segment or section is not explicitly defined in the code object file.
      See Also:
  • Method Details

    • getName

      String getName()
      Retrieve the name of the segment or section.
      Returns:
      the name, null if unsupported
    • getOffsetInFile

      long getOffsetInFile()
      Get the file offset of the segment or section.
      Returns:
      the file offset in bytes
    • getSizeInFile

      long getSizeInFile()
      Get the file size of this segment or section.
      Returns:
      the size in bytes
    • getOffsetInMemory

      long getOffsetInMemory()
      Get the in-memory, base-relative address of the beginning of this segment or section. If a base address is not known or cannot be determined, the offset is 0-relative, and therefore, considered absolute.
      Returns:
      the base-relative memory address in bytes
    • getSizeInMemory

      long getSizeInMemory()
      Get the in-memory size of this segment or section.
      Returns:
      the size in bytes
    • getFlags

      int getFlags()
      Get the flags for this segment or section.
      Returns:
      a combination of FLAG_* attributes
    • getAlignment

      long getAlignment()
      Get the memory alignment within the segment.
      Returns:
      the alignment in bytes