com.pnfsoftware.jeb.core.units.codeobject.ICodeObjectUnit |
![]() |
A common interface for object files that hold machine code.
Code objects are used to store program information, data, and code, at various stages of the program's life - compilation, linkage, execution. Popular loaders include Linux ELF, Microsoft PE/COFF, and Apple Mach-O.
This interface provides a unified representation for such files. Clients (such as the official RCP client) should be aware of this interface and use it to display additional details about the unit - without the unit implementor having to generate documents (although documents may be generated to represent unit-specific bits of data).
All methods return values are "optional".
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract long |
convertFileOffsetToRelativeAddress(long offset)
Convert a file offset to a memory address, relative to the base.
| ||||||||||
abstract long |
convertRelativeAddressToFileOffset(long rel)
Convert a memory address (relative to the base) to a file offset.
| ||||||||||
abstract List<? extends ISymbolInformation> |
getExportedSymbols()
Retrieve the list of exported symbols.
| ||||||||||
abstract List<? extends ISymbolInformation> |
getImportedSymbols()
Retrieve the list of imported symbols.
| ||||||||||
abstract ILoaderInformation |
getLoaderInformation()
Retrieve basic information about the object file.
| ||||||||||
abstract IVirtualMemory |
getRawMemoryMappedImage()
Retrieve a raw mapping of the code object.
| ||||||||||
abstract ISegmentInformation | getSection(int i) | ||||||||||
abstract int | getSectionCount() | ||||||||||
abstract List<? extends ISegmentInformation> |
getSections()
Retrieve the list of sections defined in the object file.
| ||||||||||
abstract ISegmentInformation | getSegment(int i) | ||||||||||
abstract int | getSegmentCount() | ||||||||||
abstract List<? extends ISegmentInformation> |
getSegments()
Retrieve the list of segments defined in the object file.
| ||||||||||
abstract List<? extends ISymbolInformation> | getSymbols() | ||||||||||
abstract boolean |
map(IVirtualMemory mem, long wantedBase, boolean applyRelocations)
Standard memory mapping of all publicized segments.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Convert a file offset to a memory address, relative to the base.
offset | a file offset |
---|
Convert a memory address (relative to the base) to a file offset.
rel | the base-relative memory address |
---|
Retrieve the list of exported symbols.
Retrieve the list of imported symbols.
Retrieve basic information about the object file.
Retrieve a raw mapping of the code object. No relocations are applied. Do not attempt to modify the returned VM object; it should be considered read-only.
Retrieve the list of sections defined in the object file. Typically, sections are used to point to areas of interest. Sections and segments may overlap.
Retrieve the list of segments defined in the object file. Typically, segments are mapped to memory by a code object loader. Segments and sections may overlap.
Standard memory mapping of all publicized segments.
mem | memory image onto which the mapping should be done |
---|---|
wantedBase | wanted base; set to -1L to request mapping at the normal base |