public abstract class StringSectionImpl extends BasicElementImpl implements ObjectFile.ProgbitsSectionImpl, Iterable<String>
ObjectFile.ProgbitsSectionImpl so that we can be used as the core
of progbits/regular sections, even though we can be used in other contexts too.| Constructor and Description |
|---|
StringSectionImpl() |
StringSectionImpl(ObjectFile.Element e) |
| Modifier and Type | Method and Description |
|---|---|
void |
addContentProvider(Iterable<String> contentProvider) |
Iterator<Iterable<String>> |
contentProvidersIterator() |
byte[] |
getContent() |
Iterable<BuildDependency> |
getDependencies(Map<ObjectFile.Element,LayoutDecisionMap> decisions)
Implementing this method allows to declare dependencies to other Sections (i.e.
|
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.
|
Iterator<String> |
iterator() |
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) |
getAlignment, getDecisions, getElement, getMemSize, getOrDecideOffset, getOrDecideSize, getOrDecideVaddr, getOwner, isReferenceable, setElementclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAlignment, getDecisions, getElement, getMemSize, getOrDecideOffset, getOrDecideSize, getOrDecideVaddr, isLoadable, isReferenceable, setElementforEach, spliteratorpublic StringSectionImpl(ObjectFile.Element e)
public StringSectionImpl()
public byte[] getOrDecideContent(Map<ObjectFile.Element,LayoutDecisionMap> alreadyDecided, byte[] contentHint)
ElementImplgetOrDecideContent in interface ElementImplpublic Iterable<BuildDependency> getDependencies(Map<ObjectFile.Element,LayoutDecisionMap> decisions)
ElementImplgetDependencies in interface ElementImplgetDependencies in class BasicElementImplpublic ObjectFile.Element getOrCreateRelocationElement(boolean useImplicitAddend)
ObjectFile.RelocatableSectionImplgetOrCreateRelocationElement in interface ObjectFile.RelocatableSectionImpluseImplicitAddend - whether the relocation section of interest is for implicit
addendspublic 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 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 byte[] getContent()
getContent in interface ObjectFile.ProgbitsSectionImplpublic void setContent(byte[] c)
setContent in interface ObjectFile.ProgbitsSectionImpl