LLVM: llvm::dwarf_linker::parallel::SectionDescriptor Struct Reference (original) (raw)

This structure is used to keep data of the concrete section. More...

#include "[DWARFLinker/Parallel/OutputSections.h](OutputSections%5F8h%5Fsource.html)"

Public Member Functions
SectionDescriptor (DebugSectionKind SectionKind, LinkingGlobalData &GlobalData, dwarf::FormParams Format, llvm::endianness Endianess)
void clearAllSectionData ()
Erase whole section content(data bits, list of patches).
void clearSectionContent ()
Erase only section output data bits.
template<typename T>
void notePatchWithOffsetUpdate (const T &Patch, OffsetsPtrVector &PatchesOffsetsList)
While creating patches, offsets to attributes may be partially unknown(because size of abbreviation number is unknown).
void setSizesForSectionCreatedByAsmPrinter ()
Some sections are emitted using AsmPrinter.
StringRef getContents () override
Returns section content.
void emitUnitLength (uint64_t Length)
Emit unit length into the current section contents.
void maybeEmitDwarf64Mark ()
Emit DWARF64 mark into the current section contents.
void emitOffset (uint64_t Val)
Emit specified offset value into the current section contents.
void emitIntVal (uint64_t Val, unsigned Size)
Emit specified integer value into the current section contents.
void emitString (dwarf::Form StringForm, const char *StringVal)
void emitBinaryData (llvm::StringRef Data)
void emitInplaceString (StringRef String)
Emit specified inplace string value into the current section contents.
void emitStringPlaceholder ()
Emit string placeholder into the current section contents.
void apply (uint64_t PatchOffset, dwarf::Form AttrForm, uint64_t Val)
Write specified Value of AttrForm to the PatchOffset.
uint64_t getIntVal (uint64_t PatchOffset, unsigned Size)
Returns integer value of Size located by specified PatchOffset.
Public Member Functions inherited from llvm::dwarf_linker::parallel::SectionDescriptorBase
SectionDescriptorBase (DebugSectionKind SectionKind, dwarf::FormParams Format, llvm::endianness Endianess)
virtual ~SectionDescriptorBase ()=default
DebugSectionKind getKind ()
Returns section kind.
const StringLiteral & getName () const
Returns section name.
llvm::endianness getEndianess () const
Returns endianess used by section.
dwarf::FormParams getFormParams () const
Returns FormParams used by section.
Public Attributes
friend OutputSections
uint64_t StartOffset = 0
When objects(f.e.
raw_svector_ostream OS
Stream which stores data to the Contents.
Protected Member Functions
void applyIntVal (uint64_t PatchOffset, uint64_t Val, unsigned Size)
Writes integer value Val of Size by specified PatchOffset.
void applyULEB128 (uint64_t PatchOffset, uint64_t Val)
Writes integer value Val of ULEB128 format by specified PatchOffset.
void applySLEB128 (uint64_t PatchOffset, uint64_t Val)
Writes integer value Val of SLEB128 format by specified PatchOffset.
void setOutputFormat (dwarf::FormParams Format, llvm::endianness Endianess)
Sets output format.
Protected Attributes
OutSectionDataTy Contents
Section data bits.
LinkingGlobalData & GlobalData
size_t SectionOffsetInsideAsmPrinterOutputStart = 0
Some sections are generated using AsmPrinter.
size_t SectionOffsetInsideAsmPrinterOutputEnd = 0
Protected Attributes inherited from llvm::dwarf_linker::parallel::SectionDescriptorBase
DebugSectionKind SectionKind = DebugSectionKind::NumberOfEnumEntries
The section kind.
dwarf::FormParams Format = {4, 4, dwarf::DWARF32}
Output format.
llvm::endianness Endianess = llvm::endianness::little

This structure is used to keep data of the concrete section.

Like data bits, list of patches, format.

Definition at line 152 of file OutputSections.h.

apply()

applyIntVal()

applySLEB128()

applyULEB128()

clearAllSectionData()

void SectionDescriptor::clearAllSectionData ( )

clearSectionContent()

void SectionDescriptor::clearSectionContent ( )

emitBinaryData()

emitInplaceString()

void llvm::dwarf_linker::parallel::SectionDescriptor::emitInplaceString ( StringRef String) inline

emitIntVal()

Emit specified integer value into the current section contents.

Definition at line 139 of file OutputSections.cpp.

References llvm::dwarf_linker::parallel::SectionDescriptorBase::Endianess, llvm_unreachable, llvm::native, OS, Size, and llvm::sys::swapByteOrder().

Referenced by llvm::dwarf_linker::parallel::DwarfUnit::emitDebugStringOffsetSection(), emitInplaceString(), emitOffset(), llvm::dwarf_linker::parallel::DwarfUnit::emitPubAcceleratorEntry(), llvm::dwarf_linker::parallel::DwarfUnit::emitPubAccelerators(), emitUnitLength(), and maybeEmitDwarf64Mark().

emitOffset()

void llvm::dwarf_linker::parallel::SectionDescriptor::emitOffset ( uint64_t Val) inline

emitString()

emitStringPlaceholder()

void llvm::dwarf_linker::parallel::SectionDescriptor::emitStringPlaceholder ( ) inline

emitUnitLength()

void llvm::dwarf_linker::parallel::SectionDescriptor::emitUnitLength ( uint64_t Length) inline

getContents()

StringRef llvm::dwarf_linker::parallel::SectionDescriptor::getContents ( ) inlineoverridevirtual

getIntVal()

Returns integer value of Size located by specified PatchOffset.

Definition at line 225 of file OutputSections.cpp.

References assert(), data, llvm::StringRef::data(), llvm::dwarf_linker::parallel::SectionDescriptorBase::Endianess, getContents(), llvm_unreachable, llvm::support::endian::read16(), llvm::support::endian::read32(), llvm::support::endian::read64(), Size, and llvm::size().

maybeEmitDwarf64Mark()

void llvm::dwarf_linker::parallel::SectionDescriptor::maybeEmitDwarf64Mark ( ) inline

notePatchWithOffsetUpdate()

template<typename T>

void llvm::dwarf_linker::parallel::SectionDescriptor::notePatchWithOffsetUpdate ( const T & Patch, OffsetsPtrVector & PatchesOffsetsList ) inline

setOutputFormat()

setSizesForSectionCreatedByAsmPrinter()

void SectionDescriptor::setSizesForSectionCreatedByAsmPrinter ( )

Some sections are emitted using AsmPrinter.

In that case "Contents" member of SectionDescriptor contains elf file. This method searches for section data inside elf file and remember offset to it.

Definition at line 77 of file OutputSections.cpp.

References llvm::consumeError(), Contents, llvm::object::ObjectFile::createObjectFile(), llvm::Data, llvm::dwarf_linker::parseDebugTableName(), llvm::dwarf_linker::parallel::SectionDescriptorBase::SectionKind, SectionOffsetInsideAsmPrinterOutputEnd, SectionOffsetInsideAsmPrinterOutputStart, and llvm::Expected< T >::takeError().

Referenced by llvm::dwarf_linker::parallel::DWARFLinkerImpl::emitAppleAcceleratorSections(), llvm::dwarf_linker::parallel::DwarfUnit::emitDebugInfo(), and llvm::dwarf_linker::parallel::DWARFLinkerImpl::emitDWARFv5DebugNamesSection().

Contents

GlobalData

OS

Stream which stores data to the Contents.

Definition at line 190 of file OutputSections.h.

Referenced by llvm::dwarf_linker::parallel::DWARFLinkerImpl::LinkContext::cloneAndEmitDebugFrame(), llvm::dwarf_linker::parallel::DebugLineSectionEmitter::emit(), llvm::dwarf_linker::parallel::DwarfUnit::emitAbbreviations(), llvm::dwarf_linker::parallel::DWARFLinkerImpl::emitAppleAcceleratorSections(), emitBinaryData(), llvm::dwarf_linker::parallel::DwarfUnit::emitDebugInfo(), llvm::dwarf_linker::parallel::DwarfUnit::emitDebugStringOffsetSection(), llvm::dwarf_linker::parallel::DwarfUnit::emitDwarfAbbrevEntry(), llvm::dwarf_linker::parallel::DWARFLinkerImpl::emitDWARFv5DebugNamesSection(), emitInplaceString(), emitIntVal(), llvm::dwarf_linker::parallel::DWARFLinkerImpl::LinkContext::emitInvariantSections(), llvm::dwarf_linker::parallel::DwarfUnit::emitPubAcceleratorEntry(), llvm::dwarf_linker::parallel::DwarfUnit::emitPubAccelerators(), emitString(), and SectionDescriptor().

OutputSections

friend llvm::dwarf_linker::parallel::SectionDescriptor::OutputSections

SectionOffsetInsideAsmPrinterOutputEnd

size_t llvm::dwarf_linker::parallel::SectionDescriptor::SectionOffsetInsideAsmPrinterOutputEnd = 0 protected

SectionOffsetInsideAsmPrinterOutputStart

size_t llvm::dwarf_linker::parallel::SectionDescriptor::SectionOffsetInsideAsmPrinterOutputStart = 0 protected

StartOffset

uint64_t llvm::dwarf_linker::parallel::SectionDescriptor::StartOffset = 0


The documentation for this struct was generated from the following files: