public class BasicProgbitsSectionImpl extends BasicElementImpl implements ObjectFile.ProgbitsSectionImpl
| Constructor and Description |
|---|
BasicProgbitsSectionImpl()
Create a new BasicProgbitsSectionImpl not associated with a section.
|
BasicProgbitsSectionImpl(byte[] content) |
BasicProgbitsSectionImpl(byte[] content,
ObjectFile.Section s) |
BasicProgbitsSectionImpl(ObjectFile.Section s) |
| Modifier and Type | Method and Description |
|---|---|
int |
getAlignment() |
byte[] |
getContent() |
Set<BuildDependency> |
getDependencies(Map<ObjectFile.Element,LayoutDecisionMap> decisions)
Implementing this method allows to declare dependencies to other Sections (i.e.
|
ObjectFile.Section |
getElement() |
List<ObjectFile.Section> |
getElements() |
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 |
getOrDecideSize(Map<ObjectFile.Element,LayoutDecisionMap> alreadyDecided,
int sizeHint)
Implement this method to provide the size of this section.
|
boolean |
isLoadable()
Whether this section is loaded into memory at runtime.
|
ObjectFile.RelocationRecord |
markRelocationSite(int offset,
int length,
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.
|
ObjectFile.RelocationRecord |
markRelocationSite(int offset,
int length,
ObjectFile.RelocationKind k,
String symbolName,
boolean useImplicitAddend,
Long explicitAddend)
This is like
ObjectFile.RelocatableSectionImpl.markRelocationSite(int, int, java.nio.ByteBuffer, com.oracle.objectfile.ObjectFile.RelocationKind, java.lang.String, boolean, java.lang.Long), but doesn't need to be
passed a buffer. |
void |
setContent(byte[] c) |
getDecisions, getOrDecideOffset, getOrDecideVaddr, getOwner, isReferenceable, setElementclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDecisions, getOrDecideOffset, getOrDecideVaddr, isReferenceable, setElementpublic BasicProgbitsSectionImpl(byte[] content)
public BasicProgbitsSectionImpl(ObjectFile.Section s)
public BasicProgbitsSectionImpl(byte[] content,
ObjectFile.Section s)
public BasicProgbitsSectionImpl()
public Set<BuildDependency> getDependencies(Map<ObjectFile.Element,LayoutDecisionMap> decisions)
ElementImplgetDependencies in interface ElementImplgetDependencies in class BasicElementImplpublic int getOrDecideSize(Map<ObjectFile.Element,LayoutDecisionMap> alreadyDecided, int sizeHint)
ElementImplgetOrDecideSize in interface ElementImplgetOrDecideSize in class BasicElementImplpublic byte[] getOrDecideContent(Map<ObjectFile.Element,LayoutDecisionMap> alreadyDecided, byte[] contentHint)
ElementImplgetOrDecideContent in interface ElementImplpublic int getMemSize(Map<ObjectFile.Element,LayoutDecisionMap> alreadyDecided)
ElementImplgetMemSize in interface ElementImplgetMemSize in class BasicElementImplpublic int getAlignment()
getAlignment in interface ElementImplgetAlignment in class BasicElementImplpublic void setContent(byte[] c)
setContent in interface ObjectFile.ProgbitsSectionImplpublic byte[] getContent()
getContent in interface ObjectFile.ProgbitsSectionImplpublic ObjectFile.Section getElement()
getElement in interface ElementImplgetElement in class BasicElementImplpublic List<ObjectFile.Section> getElements()
public ObjectFile.RelocationRecord markRelocationSite(int offset, int length, ObjectFile.RelocationKind k, String symbolName, boolean useImplicitAddend, Long explicitAddend)
ObjectFile.ProgbitsSectionImplObjectFile.RelocatableSectionImpl.markRelocationSite(int, int, java.nio.ByteBuffer, com.oracle.objectfile.ObjectFile.RelocationKind, java.lang.String, boolean, java.lang.Long), but doesn't need to be
passed a buffer. It uses the byte array accessed by ObjectFile.ProgbitsSectionImpl.getContent() and
ObjectFile.ProgbitsSectionImpl.setContent(byte[]).markRelocationSite in interface ObjectFile.ProgbitsSectionImplpublic final ObjectFile.RelocationRecord markRelocationSite(int offset, int length, ByteBuffer bb, ObjectFile.RelocationKind k, String symbolName, boolean useImplicitAddend, Long explicitAddend)
ObjectFile.RelocatableSectionImplmarkRelocationSite in interface ObjectFile.RelocatableSectionImploffset - the offset into the section contents of the beginning of the fixed-up byteslength - the length of byte sequence to be fixed upbb - 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 truepublic ObjectFile.Element getOrCreateRelocationElement(boolean useImplicitAddend)
ObjectFile.RelocatableSectionImplgetOrCreateRelocationElement in interface ObjectFile.RelocatableSectionImpluseImplicitAddend - whether the relocation section of interest is for implicit
addendspublic boolean isLoadable()
ElementImplisLoadable in interface ElementImpl