public class PECoffObjectFile extends ObjectFile
Modifier and Type | Class and Description |
---|---|
class |
PECoffObjectFile.PECoffDirectiveSection |
class |
PECoffObjectFile.PECoffHeader
Representation of an PECoff binary header.
|
class |
PECoffObjectFile.PECoffSection |
static class |
PECoffObjectFile.PECoffSectionFlag |
class |
PECoffObjectFile.SectionHeaderTable
PECoff's section header table "sht" is an Element which describes the file Sections.
|
ObjectFile.Element, ObjectFile.ElementComparatorByDecidedOffset, ObjectFile.Format, ObjectFile.Header, ObjectFile.IntegerDecisionComparator, ObjectFile.NobitsSectionImpl, ObjectFile.ProgbitsSectionImpl, ObjectFile.RelocatableSectionImpl, ObjectFile.RelocationKind, ObjectFile.RelocationMethod, ObjectFile.RelocationRecord, ObjectFile.RelocationSiteInfo, ObjectFile.Section, ObjectFile.Segment, ObjectFile.SizeTiebreakComparator, ObjectFile.Symbol, ObjectFile.ValueEnum
elements, nameForElement
Constructor and Description |
---|
PECoffObjectFile(int pageSize) |
Modifier and Type | Method and Description |
---|---|
ObjectFile.Symbol |
createDefinedSymbol(String name,
ObjectFile.Element baseSection,
long position,
int size,
boolean isCode,
boolean isGlobal) |
protected PECoffSymtab |
createSymbolTable() |
ObjectFile.Symbol |
createUndefinedSymbol(String name,
int size,
boolean isCode) |
protected boolean |
elementsCanSharePage(ObjectFile.Element s1,
ObjectFile.Element s2,
int off1,
int off2)
Returns whether, according to the semantics of the object file, two sections could reasonably
both be placed (partially) on the same page-sized region of virtual memory.
|
ByteOrder |
getByteOrder() |
ObjectFile.Format |
getFormat() |
int |
getIndexForSection(PECoffObjectFile.PECoffSection s) |
PECoffMachine |
getMachine() |
protected int |
getMinimumFileSize() |
PECoffRelocationTable |
getOrCreateRelocSection(PECoffSymtab syms,
boolean withExplicitAddends) |
protected ObjectFile.Segment |
getOrCreateSegment(String maybeSegmentName,
String sectionName,
boolean writable,
boolean executable)
Return a Segment object which is appropriate for containing a section of the given name, if
such a segment is mandatory according to the object file format specification.
|
List<PECoffObjectFile.PECoffSection> |
getPECoffSections() |
PECoffRelocationTable |
getRelocationTable() |
PECoffObjectFile.PECoffSection |
getSectionByIndex(int i) |
Set<ObjectFile.Segment> |
getSegments() |
SymbolTable |
getSymbolTable() |
static ByteOrder |
getTargetByteOrder() |
int |
getWordSizeInBytes() |
void |
installDebugInfo(DebugInfoProvider debugInfoProvider)
API method provided to allow a native image generator to provide details of types, code and
heap data inserted into a native image.
|
ObjectFile.Section |
newDebugSection(String name,
ElementImpl impl) |
PECoffNobitsSection |
newNobitsSection(ObjectFile.Segment segment,
String name,
ObjectFile.NobitsSectionImpl impl) |
PECoffProgbitsSection |
newProgbitsSection(ObjectFile.Segment segment,
String name,
int alignment,
boolean writable,
boolean executable,
ObjectFile.ProgbitsSectionImpl impl) |
PECoffUserDefinedSection |
newUserDefinedSection(ObjectFile.Segment segment,
String name,
int alignment,
ElementImpl impl)
Create a new section for holding user data.
|
void |
setByteOrder(ByteOrder byteorder) |
boolean |
shouldRecordDebugRelocations()
Determines whether references between debug sections should be recorded for relocation.
|
allDecisions, bake, basicDependencies, createElementList, createRuntimeDebugInfo, debugContext, decisionsByKind, defaultDecisions, defaultDependencies, defaultGetOrDecide, defaultGetOrDecideContent, defaultGetOrDecideOffset, defaultGetOrDecideSize, defaultGetOrDecideVaddr, elementForName, elementsMappedOnPage, findSegmentByName, flagSetAsLong, flagSetFromLong, getDecisionsByElement, getDecisionsTaken, getElements, getFilenameSuffix, getHeader, getNativeFormat, getNativeObjectFile, getOffsetBootstrapElement, getOrCreateSymbolTable, getPageSize, getPageSizeShift, getSections, greatestCommonDivisor, initialVaddr, lowestCommonMultiple, maximalDecisionValues, minimalDecisionValues, minimalDependencies, nameForElement, newNobitsSection, newProgbitsSection, newUserDefinedSection, nextAvailableOffset, nextAvailableVaddr, nextIntegerMultiple, nextIntegerMultipleWithCongruence, roundUpToPageSize, sortedDecisionValues, withDebugContext, write, writeBuffer
public ObjectFile.Format getFormat()
getFormat
in class ObjectFile
protected PECoffSymtab createSymbolTable()
createSymbolTable
in class ObjectFile
public ObjectFile.Symbol createDefinedSymbol(String name, ObjectFile.Element baseSection, long position, int size, boolean isCode, boolean isGlobal)
createDefinedSymbol
in class ObjectFile
public ObjectFile.Symbol createUndefinedSymbol(String name, int size, boolean isCode)
createUndefinedSymbol
in class ObjectFile
protected ObjectFile.Segment getOrCreateSegment(String maybeSegmentName, String sectionName, boolean writable, boolean executable)
ObjectFile
getOrCreateSegment
in class ObjectFile
maybeSegmentName
- either null, or the name of a segment which the caller would prefer
should contain the given section (in the case where multiple names would be
possible for the created segment, so the choice would be ambiguous)sectionName
- a platform-dependent section namewritable
- whether the segment contents should be writableexecutable
- whether the segment contents should be executablepublic PECoffUserDefinedSection newUserDefinedSection(ObjectFile.Segment segment, String name, int alignment, ElementImpl impl)
ObjectFile
newUserDefinedSection
in class ObjectFile
public PECoffProgbitsSection newProgbitsSection(ObjectFile.Segment segment, String name, int alignment, boolean writable, boolean executable, ObjectFile.ProgbitsSectionImpl impl)
newProgbitsSection
in class ObjectFile
public PECoffNobitsSection newNobitsSection(ObjectFile.Segment segment, String name, ObjectFile.NobitsSectionImpl impl)
newNobitsSection
in class ObjectFile
public PECoffObjectFile.PECoffSection getSectionByIndex(int i)
public int getIndexForSection(PECoffObjectFile.PECoffSection s)
protected boolean elementsCanSharePage(ObjectFile.Element s1, ObjectFile.Element s2, int off1, int off2)
ObjectFile
elementsCanSharePage
in class ObjectFile
s1
- one sections2
- another sectionpublic List<PECoffObjectFile.PECoffSection> getPECoffSections()
public Set<ObjectFile.Segment> getSegments()
getSegments
in class ObjectFile
public ByteOrder getByteOrder()
getByteOrder
in class ObjectFile
public void setByteOrder(ByteOrder byteorder)
setByteOrder
in class ObjectFile
public static ByteOrder getTargetByteOrder()
public int getWordSizeInBytes()
getWordSizeInBytes
in class ObjectFile
public boolean shouldRecordDebugRelocations()
ObjectFile
shouldRecordDebugRelocations
in class ObjectFile
public PECoffMachine getMachine()
public PECoffRelocationTable getOrCreateRelocSection(PECoffSymtab syms, boolean withExplicitAddends)
public SymbolTable getSymbolTable()
getSymbolTable
in class ObjectFile
public PECoffRelocationTable getRelocationTable()
protected int getMinimumFileSize()
getMinimumFileSize
in class ObjectFile
public ObjectFile.Section newDebugSection(String name, ElementImpl impl)
newDebugSection
in class ObjectFile
public void installDebugInfo(DebugInfoProvider debugInfoProvider)
ObjectFile
installDebugInfo
in class ObjectFile
debugInfoProvider
- an implementation of the provider interface that communicates
details of the relevant types, code and heap data.