public class PECoffUserDefinedSection extends PECoffObjectFile.PECoffSection implements ObjectFile.RelocatableSectionImpl
Modifier and Type | Field and Description |
---|---|
protected ElementImpl |
impl |
Modifier and Type | Method and Description |
---|---|
LayoutDecisionMap |
getDecisions(LayoutDecisionMap copyingIn) |
Iterable<BuildDependency> |
getDependencies(Map<ObjectFile.Element,LayoutDecisionMap> decisions)
Implementing this method allows to declare dependencies to other Sections (i.e.
|
ElementImpl |
getImpl() |
int |
getMemSize(Map<ObjectFile.Element,LayoutDecisionMap> alreadyDecided)
Implement this method to provide the section size in memory (at runtime).
|
ObjectFile.Element |
getOrCreateRelocationElement(boolean useImplicitAddend)
Force the creation of a relocation section/element for this section, and return it.
|
byte[] |
getOrDecideContent(Map<ObjectFile.Element,LayoutDecisionMap> alreadyDecided,
byte[] contentHint)
Implement this method to deliver the content of the section.
|
int |
getOrDecideOffset(Map<ObjectFile.Element,LayoutDecisionMap> alreadyDecided,
int offsetHint)
Implement this method to provide the offset this section should be placed at.
|
int |
getOrDecideSize(Map<ObjectFile.Element,LayoutDecisionMap> alreadyDecided,
int sizeHint)
Implement this method to provide the size of this section.
|
int |
getOrDecideVaddr(Map<ObjectFile.Element,LayoutDecisionMap> alreadyDecided,
int vaddrHint)
Implement this method to provide the virtual address of this section.
|
ObjectFile.RelocationRecord |
markRelocationSite(int offset,
ByteBuffer bb,
ObjectFile.RelocationKind k,
String symbolName,
boolean useImplicitAddend,
Long explicitAddend)
Record (in a format-specific way) that data at the given offset in the file, for the
given number of bytes, should be fixed up according to the value of the given symbol and
the given kind of relocation.
|
void |
setImpl(ElementImpl impl) |
getEntrySize, getFlags, getLinkedInfo, getLinkedSection, getOwner, getRelocEntries, getSectionID, isLoadable, isReferenceable, setFlags, setRelocEntries, setSectionID
getAlignment, getElement, getElementName, getName, setElement, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAlignment, getElement, isLoadable, isReferenceable, setElement
protected ElementImpl impl
public ElementImpl getImpl()
getImpl
in class ObjectFile.Element
public void setImpl(ElementImpl impl)
public Iterable<BuildDependency> getDependencies(Map<ObjectFile.Element,LayoutDecisionMap> decisions)
ElementImpl
getDependencies
in interface ElementImpl
public int getOrDecideOffset(Map<ObjectFile.Element,LayoutDecisionMap> alreadyDecided, int offsetHint)
ElementImpl
getOrDecideOffset
in interface ElementImpl
public int getOrDecideSize(Map<ObjectFile.Element,LayoutDecisionMap> alreadyDecided, int sizeHint)
ElementImpl
getOrDecideSize
in interface ElementImpl
public byte[] getOrDecideContent(Map<ObjectFile.Element,LayoutDecisionMap> alreadyDecided, byte[] contentHint)
ElementImpl
getOrDecideContent
in interface ElementImpl
public int getOrDecideVaddr(Map<ObjectFile.Element,LayoutDecisionMap> alreadyDecided, int vaddrHint)
ElementImpl
ElementImpl.isLoadable()
).getOrDecideVaddr
in interface ElementImpl
public int getMemSize(Map<ObjectFile.Element,LayoutDecisionMap> alreadyDecided)
ElementImpl
getMemSize
in interface ElementImpl
getMemSize
in class ObjectFile.Element
public LayoutDecisionMap getDecisions(LayoutDecisionMap copyingIn)
getDecisions
in interface ElementImpl
getDecisions
in class ObjectFile.Element
public ObjectFile.Element getOrCreateRelocationElement(boolean useImplicitAddend)
ObjectFile.RelocatableSectionImpl
getOrCreateRelocationElement
in interface ObjectFile.RelocatableSectionImpl
useImplicitAddend
- whether the relocation section of interest is for implicit
addendspublic ObjectFile.RelocationRecord markRelocationSite(int offset, ByteBuffer bb, ObjectFile.RelocationKind k, String symbolName, boolean useImplicitAddend, Long explicitAddend)
ObjectFile.RelocatableSectionImpl
markRelocationSite
in interface ObjectFile.RelocatableSectionImpl
offset
- the offset into the section contents of the beginning of the fixed-up bytesbb
- the byte buffer representing the encoded section contents, at least as far as
offset + length bytesk
- the kind of fixup to be appliedsymbolName
- the name of the symbol whose value is used to compute the fixed-up
bytesuseImplicitAddend
- whether the current bytes are to be used as an addendexplicitAddend
- a full-width addend, or null if useImplicitAddend is true