public interface

ISegmentInformation

com.pnfsoftware.jeb.core.units.codeobject.ISegmentInformation
Known Indirect Subclasses

Class Overview

Definition of object code segments and sections.

Summary

Constants
int FLAG_ALLOC_ON_WRITE The segment will be allocated once there is an actual write to it.
int FLAG_EXECUTE The segment or section is executable
int FLAG_INVALID The segment or section appears invalid.
int FLAG_READ The segment or section is readable
int FLAG_RW Combination flag: R, W
int FLAG_RWX Combination flag: R, W, X
int FLAG_SYNTHETIC The segment or section is not explicitly defined in the code object file.
int FLAG_WRITE The segment or section is writable
Public Methods
abstract long getAlignment()
Get the memory alignment within the segment.
abstract int getFlags()
Get the flags for this segment or section.
abstract String getName()
Retrieve the name of the segment or section.
abstract long getOffsetInFile()
Get the file offset of the segment or section.
abstract long getOffsetInMemory()
Get the in-memory, base-relative address of the beginning of this segment or section.
abstract long getSizeInFile()
Get the file size of this segment or section.
abstract long getSizeInMemory()
Get the in-memory size of this segment or section.

Constants

public 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.

Constant Value: 1073741824 (0x40000000)

public static final int FLAG_EXECUTE

The segment or section is executable

Constant Value: 4 (0x00000004)

public static final int FLAG_INVALID

The segment or section appears invalid.

Constant Value: 536870912 (0x20000000)

public static final int FLAG_READ

The segment or section is readable

Constant Value: 2 (0x00000002)

public static final int FLAG_RW

Combination flag: R, W

Constant Value: 3 (0x00000003)

public static final int FLAG_RWX

Combination flag: R, W, X

Constant Value: 7 (0x00000007)

public static final int FLAG_SYNTHETIC

The segment or section is not explicitly defined in the code object file.

Constant Value: -2147483648 (0x80000000)

public static final int FLAG_WRITE

The segment or section is writable

Constant Value: 1 (0x00000001)

Public Methods

public abstract long getAlignment ()

Get the memory alignment within the segment.

Returns
  • the alignment in bytes

public abstract int getFlags ()

Get the flags for this segment or section.

Returns
  • a combination of FLAG_* attributes

public abstract String getName ()

Retrieve the name of the segment or section.

Returns
  • the name, null if unsupported

public abstract long getOffsetInFile ()

Get the file offset of the segment or section.

Returns
  • the file offset in bytes

public abstract 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

public abstract long getSizeInFile ()

Get the file size of this segment or section.

Returns
  • the size in bytes

public abstract long getSizeInMemory ()

Get the in-memory size of this segment or section.

Returns
  • the size in bytes