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(long addend)
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() |
void |
markRelocationSite(int offset,
ByteBuffer bb,
ObjectFile.RelocationKind k,
String symbolName,
long addend)
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 |
markRelocationSite(int offset,
ObjectFile.RelocationKind k,
String symbolName,
long addend)
This is like
ObjectFile.RelocatableSectionImpl.markRelocationSite(int, java.nio.ByteBuffer, com.oracle.objectfile.ObjectFile.RelocationKind, java.lang.String, 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, 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(long addend)
ObjectFile.RelocatableSectionImplgetOrCreateRelocationElement in interface ObjectFile.RelocatableSectionImpladdend - whether a full-width addend, or 0 if unneededpublic void markRelocationSite(int offset,
ObjectFile.RelocationKind k,
String symbolName,
long addend)
ObjectFile.ProgbitsSectionImplObjectFile.RelocatableSectionImpl.markRelocationSite(int, java.nio.ByteBuffer, com.oracle.objectfile.ObjectFile.RelocationKind, java.lang.String, 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 void markRelocationSite(int offset,
ByteBuffer bb,
ObjectFile.RelocationKind k,
String symbolName,
long addend)
ObjectFile.RelocatableSectionImplmarkRelocationSite in interface ObjectFile.RelocatableSectionImploffset - 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
bytesaddend - a full-width addend, or 0 if unneededpublic byte[] getContent()
getContent in interface ObjectFile.ProgbitsSectionImplpublic void setContent(byte[] c)
setContent in interface ObjectFile.ProgbitsSectionImpl