Interface ISegmentInformation
- All Known Implementing Classes:
SegmentInformation
Definition of object code segments and sections.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The segment will be allocated once there is an actual write to it.static final int
The segment or section is executablestatic final int
The segment or section appears invalid.static final int
The segment or section is readablestatic final int
Combination flag: R, Wstatic final int
Combination flag: R, W, Xstatic 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 TypeMethodDescriptionlong
Get the memory alignment within the segment.int
getFlags()
Get the flags for this segment or section.getName()
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_WRITEThe segment or section is writable- See Also:
-
FLAG_READ
static final int FLAG_READThe segment or section is readable- See Also:
-
FLAG_EXECUTE
static final int FLAG_EXECUTEThe segment or section is executable- See Also:
-
FLAG_RW
static final int FLAG_RWCombination flag: R, W- See Also:
-
FLAG_RWX
static final int FLAG_RWXCombination flag: R, W, X- See Also:
-
FLAG_INVALID
static final int FLAG_INVALIDThe segment or section appears invalid.- See Also:
-
FLAG_ALLOC_ON_WRITE
static final int FLAG_ALLOC_ON_WRITEThe 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_SYNTHETICThe 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
-