66#define DEBUG_TYPE "reloc-info"
76class SymbolTableWriter {
81 std::vector<uint32_t> ShndxIndexes;
86 void createSymtabShndx();
91 SymbolTableWriter(ELFWriter &EWriter,
bool Is64Bit);
111 bool Used,
bool Renamed);
114 struct ELFSymbolData {
130 unsigned LastLocalSymbolIndex = ~0u;
132 unsigned StringTableIndex = ~0u;
134 unsigned SymbolTableIndex = ~0u;
137 std::vector<MCSectionELF *> SectionTable;
151 bool IsLittleEndian, DwoMode Mode)
163 template <
typename T>
void write(
T Val) {
169 void writeSymbol(
const MCAssembler &Asm, SymbolTableWriter &Writer,
170 uint32_t StringIndex, ELFSymbolData &MSD);
179 void computeSymbolTable(
MCAssembler &Asm,
const RevGroupMapTy &RevGroupMap);
181 void writeAddrsigSection();
206 W.OS.write_zeros(NewOffset -
Offset);
210unsigned ELFWriter::addToSectionTable(
MCSectionELF *Sec) {
211 SectionTable.push_back(Sec);
212 StrTabBuilder.add(Sec->
getName());
213 return SectionTable.size();
216void SymbolTableWriter::createSymtabShndx() {
217 if (!ShndxIndexes.empty())
220 ShndxIndexes.resize(NumWritten);
223template <
typename T>
void SymbolTableWriter::write(
T Value) {
224 EWriter.write(
Value);
227SymbolTableWriter::SymbolTableWriter(ELFWriter &EWriter,
bool Is64Bit)
228 : EWriter(EWriter), Is64Bit(Is64Bit), NumWritten(0) {}
238 if (!ShndxIndexes.empty()) {
240 ShndxIndexes.push_back(shndx);
242 ShndxIndexes.push_back(0);
266bool ELFWriter::is64Bit()
const {
267 return OWriter.TargetObjectWriter->is64Bit();
271void ELFWriter::writeHeader(
const MCAssembler &Asm) {
290 uint8_t OSABI = OWriter.TargetObjectWriter->getOSABI();
295 W.OS <<
char(OWriter.OverrideABIVersion
296 ? *OWriter.OverrideABIVersion
297 : OWriter.TargetObjectWriter->getABIVersion());
303 W.write<
uint16_t>(OWriter.TargetObjectWriter->getEMachine());
311 W.write<
uint32_t>(OWriter.getELFHeaderEFlags());
334 return Sym.getCommonAlignment()->value();
337 if (!
Asm.getSymbolOffset(
Sym, Res))
340 if (
Asm.isThumbFunc(&
Sym))
347 uint8_t
Type = newType;
384 if (!Symbol->isVariable() ||
385 !(
Value = dyn_cast<MCSymbolRefExpr>(Symbol->getVariableValue())) ||
389 Symbol = &cast<MCSymbolELF>(
Value->getSymbol());
394void ELFWriter::writeSymbol(
const MCAssembler &Asm, SymbolTableWriter &Writer,
395 uint32_t StringIndex, ELFSymbolData &MSD) {
396 const auto &
Symbol = cast<MCSymbolELF>(*MSD.Symbol);
398 cast_or_null<MCSymbolELF>(
Asm.getBaseSymbol(Symbol));
405 uint8_t Binding =
Symbol.getBinding();
412 uint8_t
Info = (Binding << 4) |
Type;
416 uint8_t Visibility =
Symbol.getVisibility();
422 const MCExpr *ESize = MSD.Symbol->getSize();
423 if (!ESize &&
Base) {
425 ESize =
Base->getSize();
432 while (
Sym->isVariable()) {
434 dyn_cast<MCSymbolRefExpr>(
Sym->getVariableValue(
false))) {
435 Sym = cast<MCSymbolELF>(&Expr->getSymbol());
438 ESize =
Sym->getSize();
452 Writer.writeSymbol(StringIndex, Info,
Value,
Size,
Other, MSD.SectionIndex,
457 bool Used,
bool Renamed) {
458 if (
Symbol.isVariable()) {
461 if (
const auto *
T = dyn_cast<MCTargetExpr>(Expr))
462 if (
T->inlineAssignedExpr())
478 Asm.getBaseSymbol(Symbol);
491void ELFWriter::computeSymbolTable(
MCAssembler &Asm,
492 const RevGroupMapTy &RevGroupMap) {
494 SymbolTableWriter Writer(*
this,
is64Bit());
501 SymbolTableIndex = addToSectionTable(SymtabSection);
506 Writer.writeSymbol(0, 0, 0, 0, 0, 0,
false);
508 std::vector<ELFSymbolData> LocalSymbolData;
509 std::vector<ELFSymbolData> ExternalSymbolData;
511 OWriter.getFileNames();
512 for (
const std::pair<std::string, size_t> &
F : FileNames)
513 StrTabBuilder.add(
F.first);
516 bool HasLargeSectionIndex =
false;
518 const auto &
Symbol = cast<MCSymbolELF>(It.value());
520 bool WeakrefUsed =
Symbol.isWeakrefUsedInReloc();
521 bool isSignature =
Symbol.isSignature();
523 if (!
isInSymtab(Asm, Symbol, Used || WeakrefUsed || isSignature,
524 OWriter.Renames.count(&Symbol)))
533 MSD.Symbol = cast<MCSymbolELF>(&Symbol);
534 MSD.Order = It.index();
539 if (
Symbol.isAbsolute()) {
541 }
else if (
Symbol.isCommon()) {
542 if (
Symbol.isTargetCommon()) {
543 MSD.SectionIndex =
Symbol.getIndex();
548 }
else if (
Symbol.isUndefined()) {
549 if (isSignature && !Used) {
550 MSD.SectionIndex = RevGroupMap.lookup(&Symbol);
552 HasLargeSectionIndex =
true;
569 "Undefined section reference: " +
Symbol.getName());
575 MSD.SectionIndex =
Section.getOrdinal();
576 assert(MSD.SectionIndex &&
"Invalid section index!");
578 HasLargeSectionIndex =
true;
592 StrTabBuilder.add(
Name);
596 LocalSymbolData.push_back(MSD);
598 ExternalSymbolData.push_back(MSD);
602 unsigned SymtabShndxSectionIndex = 0;
604 if (HasLargeSectionIndex) {
607 SymtabShndxSectionIndex = addToSectionTable(SymtabShndxSection);
611 StrTabBuilder.finalize();
615 auto FileNameIt = FileNames.begin();
616 if (!FileNames.empty())
617 FileNames[0].second = 0;
619 for (ELFSymbolData &MSD : LocalSymbolData) {
621 for (; FileNameIt != FileNames.end() && FileNameIt->second <= MSD.Order;
623 Writer.writeSymbol(StrTabBuilder.getOffset(FileNameIt->first),
631 : StrTabBuilder.getOffset(MSD.Name);
632 MSD.Symbol->setIndex(
Index++);
633 writeSymbol(Asm, Writer, StringIndex, MSD);
635 for (; FileNameIt != FileNames.end(); ++FileNameIt) {
636 Writer.writeSymbol(StrTabBuilder.getOffset(FileNameIt->first),
643 LastLocalSymbolIndex =
Index;
645 for (ELFSymbolData &MSD : ExternalSymbolData) {
646 unsigned StringIndex = StrTabBuilder.getOffset(MSD.Name);
647 MSD.Symbol->setIndex(
Index++);
648 writeSymbol(Asm, Writer, StringIndex, MSD);
656 if (ShndxIndexes.
empty()) {
657 assert(SymtabShndxSectionIndex == 0);
660 assert(SymtabShndxSectionIndex != 0);
662 SecStart =
W.OS.tell();
663 MCSectionELF *SymtabShndxSection = SectionTable[SymtabShndxSectionIndex - 1];
666 SecEnd =
W.OS.tell();
667 SymtabShndxSection->
setOffsets(SecStart, SecEnd);
670void ELFWriter::writeAddrsigSection() {
671 for (
const MCSymbol *
Sym : OWriter.getAddrsigSyms())
672 if (
Sym->getIndex() != 0)
678 if (OWriter.Relocations[&Sec].empty())
687 if (TO && TO->
Crel) {
694 const bool Rela = OWriter.usesRela(TO, Sec);
710bool ELFWriter::maybeWriteCompression(
715 if (
Size <= HdrSize + CompressedContents.
size())
736 auto &Ctx =
Asm.getContext();
739 : DebugCompressionType::None;
740 if (CompressionType == DebugCompressionType::None ||
742 Asm.writeSectionData(
W.OS, &Section);
748 Asm.writeSectionData(VecOS, &Section);
750 ArrayRef(
reinterpret_cast<uint8_t *
>(UncompressedData.
data()),
751 UncompressedData.
size());
755 switch (CompressionType) {
756 case DebugCompressionType::None:
758 case DebugCompressionType::Zlib:
761 case DebugCompressionType::Zstd:
767 if (!maybeWriteCompression(ChType, UncompressedData.
size(), Compressed,
769 W.OS << UncompressedData;
792 WriteWord(Alignment ? Alignment->value() : 0);
793 WriteWord(EntrySize);
798 using uint = std::conditional_t<Is64, uint64_t, uint32_t>;
800 uint32_t SymIdx = R.Symbol ? R.Symbol->getIndex() : 0;
802 std::make_signed_t<uint>(R.Addend)};
806void ELFWriter::writeRelocations(
const MCAssembler &Asm,
808 std::vector<ELFRelocationEntry> &Relocs = OWriter.Relocations[&Sec];
810 const bool Rela = OWriter.usesRela(TO, Sec);
813 OWriter.TargetObjectWriter->sortRelocs(Asm, Relocs);
815 if (OWriter.TargetObjectWriter->getEMachine() ==
ELF::EM_MIPS) {
821 write(OWriter.TargetObjectWriter->getRSsym(
Entry.Type));
822 write(OWriter.TargetObjectWriter->getRType3(
Entry.Type));
823 write(OWriter.TargetObjectWriter->getRType2(
Entry.Type));
824 write(OWriter.TargetObjectWriter->getRType(
Entry.Type));
835 OWriter.TargetObjectWriter->getRType2(
Entry.Type)) {
842 OWriter.TargetObjectWriter->getRType3(
Entry.Type)) {
850 }
else if (TO && TO->
Crel) {
852 encodeCrel<true>(Relocs,
W.OS);
854 encodeCrel<false>(Relocs,
W.OS);
893 sh_link = SymbolTableIndex;
894 assert(sh_link &&
".symtab not found");
901 sh_link = StringTableIndex;
902 sh_info = LastLocalSymbolIndex;
908 sh_link = SymbolTableIndex;
912 sh_link = SymbolTableIndex;
913 sh_info = GroupSymbolIndex;
921 if (
Sym &&
Sym->isInSection())
922 sh_link =
Sym->getSection().getOrdinal();
925 WriteSecHdrEntry(StrTabBuilder.getOffset(
Section.getName()),
927 sh_link, sh_info,
Section.getAlign(),
931void ELFWriter::writeSectionHeader(
const MCAssembler &Asm) {
932 const unsigned NumSections = SectionTable.size();
937 WriteSecHdrEntry(0, 0, 0, 0, 0, FirstSectionSize, 0, 0, std::nullopt, 0);
943 GroupSymbolIndex = 0;
945 GroupSymbolIndex =
Section->getGroup()->getIndex();
950 Size =
Asm.getSectionAddressSize(*Section);
954 writeSection(GroupSymbolIndex,
Offsets.first,
Size, *Section);
964 StringTableIndex = addToSectionTable(StrtabSection);
966 RevGroupMapTy RevGroupMap;
987 writeSectionData(Asm, Section);
990 Section.setOffsets(SecStart, SecEnd);
992 MCSectionELF *RelSection = createRelocationSection(Ctx, Section);
994 unsigned *GroupIdxEntry =
nullptr;
995 if (SignatureSymbol) {
996 GroupIdxEntry = &RevGroupMap[SignatureSymbol];
997 if (!*GroupIdxEntry) {
1000 *GroupIdxEntry = addToSectionTable(Group);
1003 GroupMap.
resize(*GroupIdxEntry + 1);
1004 GroupMap[*GroupIdxEntry] =
Groups.size();
1009 Section.setOrdinal(addToSectionTable(&Section));
1011 RelSection->
setOrdinal(addToSectionTable(RelSection));
1015 if (GroupIdxEntry) {
1016 auto &Members =
Groups[GroupMap[*GroupIdxEntry]];
1017 Members.second.push_back(
Section.getOrdinal());
1019 Members.second.push_back(RelSection->
getOrdinal());
1022 OWriter.TargetObjectWriter->addTargetSectionFlags(Ctx, Section);
1025 for (
auto &[Group, Members] :
Groups) {
1030 W.write<
unsigned>(Members);
1036 if (Mode == DwoOnly) {
1039 StrTabBuilder.finalize();
1042 if (OWriter.getEmitAddrsigSection()) {
1045 addToSectionTable(AddrsigSection);
1049 computeSymbolTable(Asm, RevGroupMap);
1055 writeRelocations(Asm,
1062 if (OWriter.getEmitAddrsigSection()) {
1064 writeAddrsigSection();
1066 AddrsigSection->
setOffsets(SecStart, SecEnd);
1072 StrTabBuilder.write(
W.OS);
1079 writeSectionHeader(Asm);
1081 uint16_t NumSections = support::endian::byte_swap<uint16_t>(
1083 : SectionTable.size() + 1,
1085 unsigned NumSectionsOffset;
1090 support::endian::byte_swap<uint64_t>(SectionHeaderOffset,
W.Endian);
1091 Stream.pwrite(
reinterpret_cast<char *
>(&Val),
sizeof(Val),
1096 support::endian::byte_swap<uint32_t>(SectionHeaderOffset,
W.Endian);
1097 Stream.pwrite(
reinterpret_cast<char *
>(&Val),
sizeof(Val),
1101 Stream.pwrite(
reinterpret_cast<char *
>(&NumSections),
sizeof(NumSections),
1104 return W.OS.tell() - StartOffset;
1110 IsLittleEndian(IsLittleEndian) {}
1114 : TargetObjectWriter(
std::
move(MOTW)),
OS(
OS), DwoOS(&DwoOS),
1115 IsLittleEndian(IsLittleEndian) {}
1118 ELFHeaderEFlags = 0;
1136 const auto &Symbol = cast<MCSymbolELF>(*S.Sym);
1137 size_t Pos = AliasName.
find(
'@');
1144 Tail = Rest.
substr(Symbol.isUndefined() ? 2 : 1);
1147 cast<MCSymbolELF>(Asm.getContext().getOrCreateSymbol(Prefix +
Tail));
1148 Asm.registerSymbol(*Alias);
1150 Alias->setVariableValue(
Value);
1154 Alias->setBinding(Symbol.getBinding());
1155 Alias->setVisibility(Symbol.getVisibility());
1156 Alias->setOther(Symbol.getOther());
1158 if (!Symbol.isUndefined() && S.KeepOriginalSym)
1161 if (Symbol.isUndefined() && Rest.
starts_with(
"@@") &&
1163 Asm.getContext().reportError(S.Loc,
"default version symbol " +
1164 AliasName +
" must be defined");
1169 Asm.getContext().reportError(S.Loc,
Twine(
"multiple versions for ") +
1174 Renames.insert(std::make_pair(&Symbol, Alias));
1180 if (
Sym->isInSection() &&
Sym->getName().starts_with(
".L"))
1181 Sym =
Sym->getSection().getBeginSymbol();
1182 Sym->setUsedInReloc();
1193 unsigned Type)
const {
1230 if (
Sym->isUndefined())
1239 if (
Sym->isMemtag())
1242 unsigned Binding =
Sym->getBinding();
1273 if (
Sym->isInSection()) {
1274 auto &Sec = cast<MCSectionELF>(
Sym->getSection());
1283 Type == ELF::R_386_GOTOFF)
1310 if (Asm.isThumbFunc(
Sym))
1323 Ctx.
reportError(Loc,
"A dwo section may not contain relocations");
1327 Ctx.
reportError(Loc,
"A relocation may not refer to a dwo section");
1343 uint64_t FixupOffset = Asm.getFragmentOffset(*Fragment) +
Fixup.getOffset();
1348 const auto &SymB = cast<MCSymbolELF>(RefB->getSymbol());
1349 if (SymB.isUndefined()) {
1351 Twine(
"symbol '") + SymB.getName() +
1352 "' can not be undefined in a subtraction expression");
1356 assert(!SymB.isAbsolute() &&
"Should have been folded");
1357 const MCSection &SecB = SymB.getSection();
1358 if (&SecB != &FixupSection) {
1360 "Cannot represent a difference across sections");
1364 assert(!IsPCRel &&
"should have been folded");
1366 C += FixupOffset - Asm.getSymbolOffset(SymB);
1371 const auto *SymA = RefA ? cast<MCSymbolELF>(&RefA->
getSymbol()) :
nullptr;
1373 bool ViaWeakRef =
false;
1374 if (SymA && SymA->isVariable()) {
1375 const MCExpr *Expr = SymA->getVariableValue();
1376 if (
const auto *Inner = dyn_cast<MCSymbolRefExpr>(Expr)) {
1378 SymA = cast<MCSymbolELF>(&Inner->getSymbol());
1384 const MCSectionELF *SecA = (SymA && SymA->isInSection())
1385 ? cast<MCSectionELF>(&SymA->getSection())
1391 const auto *Parent = cast<MCSectionELF>(Fragment->
getParent());
1393 bool RelocateWithSymbol =
1398 FixedValue = !RelocateWithSymbol && SymA && !SymA->isUndefined()
1399 ?
C + Asm.getSymbolOffset(*SymA)
1402 Addend = FixedValue;
1406 if (!RelocateWithSymbol) {
1407 const auto *SectionSymbol =
1410 SectionSymbol->setUsedInReloc();
1439 bool InSet,
bool IsPCRel)
const {
1440 const auto &SymA = cast<MCSymbolELF>(SA);
1447 return &SymA.getSection() == FB.
getParent();
1453 DwoOS ? ELFWriter::NonDwoOnly : ELFWriter::AllSections)
#define offsetof(TYPE, MEMBER)
BlockVerifier::State From
Analysis containing CSE Info
Given that RA is a live value
This file defines the DenseMap class.
static uint8_t mergeTypeForSet(uint8_t origType, uint8_t newType)
static void encodeCrel(ArrayRef< ELFRelocationEntry > Relocs, raw_ostream &OS)
static bool isIFunc(const MCSymbolELF *Symbol)
std::optional< std::vector< StOtherPiece > > Other
PowerPC TLS Dynamic Call Fixup
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines the SmallVector class.
static SymbolRef::Type getType(const Symbol *Sym)
static bool isInSymtab(const MCSymbolWasm &Sym)
static bool isDwoSection(const MCSection &Sec)
static bool is64Bit(const char *name)
static const X86InstrFMA3Group Groups[]
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
bool empty() const
empty - Check if the array is empty.
std::unique_ptr< MCELFObjectTargetWriter > TargetObjectWriter
ELFObjectWriter(std::unique_ptr< MCELFObjectTargetWriter > MOTW, raw_pwrite_stream &OS, bool IsLittleEndian)
bool shouldRelocateWithSymbol(const MCAssembler &Asm, const MCValue &Val, const MCSymbolELF *Sym, uint64_t C, unsigned Type) const
uint64_t writeObject(MCAssembler &Asm) override
Write the object file and returns the number of bytes written.
void executePostLayoutBinding(MCAssembler &Asm) override
Perform any late binding of symbols (for example, to assign symbol indices for use when generating re...
void reset() override
lifetime management
std::optional< uint8_t > OverrideABIVersion
void recordRelocation(MCAssembler &Asm, const MCFragment *Fragment, const MCFixup &Fixup, MCValue Target, uint64_t &FixedValue) override
Record a relocation entry.
DenseMap< const MCSectionELF *, std::vector< ELFRelocationEntry > > Relocations
SmallVector< Symver, 0 > Symvers
bool isSymbolRefDifferenceFullyResolvedImpl(const MCAssembler &Asm, const MCSymbol &SymA, const MCFragment &FB, bool InSet, bool IsPCRel) const override
bool hasRelocationAddend() const
bool checkRelocation(MCContext &Ctx, SMLoc Loc, const MCSectionELF *From, const MCSectionELF *To)
raw_pwrite_stream * DwoOS
bool usesRela(const MCTargetOptions *TO, const MCSectionELF &Sec) const
DenseMap< const MCSymbolELF *, const MCSymbolELF * > Renames
Generic interface to target specific assembler backends.
virtual const MCFixupKindInfo & getFixupKindInfo(MCFixupKind Kind) const
Get information on a fixup kind.
Context object for machine code objects.
MCSectionELF * createELFRelSection(const Twine &Name, unsigned Type, unsigned Flags, unsigned EntrySize, const MCSymbolELF *Group, const MCSectionELF *RelInfoSection)
MCSectionELF * getELFSection(const Twine &Section, unsigned Type, unsigned Flags)
void reportError(SMLoc L, const Twine &Msg)
const MCTargetOptions * getTargetOptions() const
MCSectionELF * createELFGroupSection(const MCSymbolELF *Group, bool IsComdat)
Base class for the full range of assembler expressions which are needed for parsing.
bool evaluateKnownAbsolute(int64_t &Res, const MCAssembler &Asm) const
Aggressive variant of evaluateAsRelocatable when relocations are unavailable (e.g.
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
MCSection * getParent() const
virtual void reset()
lifetime management
std::vector< const MCSymbol * > AddrsigSyms
This represents a section on linux, lots of unix variants and some bare metal systems.
const MCSection * getLinkedToSection() const
unsigned getFlags() const
void setOffsets(uint64_t Start, uint64_t End)
const MCSymbolELF * getGroup() const
Instances of this class represent a uniqued identifier for a section in the current translation unit.
void setAlignment(Align Value)
unsigned getOrdinal() const
void setOrdinal(unsigned Value)
StringRef getName() const
MCSymbol * getBeginSymbol()
void setIsWeakrefUsedInReloc() const
Represent a reference to a symbol from inside an expression.
const MCSymbol & getSymbol() const
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
VariantKind getKind() const
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
void setUsedInReloc() const
DebugCompressionType CompressDebugSections
This represents an "assembler immediate".
const MCSymbolRefExpr * getSymA() const
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
Represents a location in source code.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
void push_back(const T &Elt)
pointer data()
Return a pointer to the vector's buffer, even if empty().
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
constexpr StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
bool starts_with(StringRef Prefix) const
Check if this string starts with the given Prefix.
size_t find(char C, size_t From=0) const
Search for the first character C in the string.
bool ends_with(StringRef Suffix) const
Check if this string ends with the given Suffix.
static constexpr size_t npos
Utility for building string tables with deduplicated suffixes.
Target - Wrapper for Target specific information.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream.
An abstract base class for streams implementations that also support a pwrite operation.
A raw_ostream that writes to an SmallVector or SmallString.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
@ Tail
Attemps to make calls as fast as possible while guaranteeing that tail call optimization can always b...
@ C
The default llvm calling convention, compatible with C.
static const char ElfMagic[]
@ SHT_LLVM_CALL_GRAPH_PROFILE
void compress(Params P, ArrayRef< uint8_t > Input, SmallVectorImpl< uint8_t > &Output)
StringRef toStringRef(const std::optional< DWARFFormValue > &V, StringRef Default={})
Take an optional DWARFFormValue and try to extract a string value from it.
This is an optimization pass for GlobalISel generic memory operations.
auto size(R &&Range, std::enable_if_t< std::is_base_of< std::random_access_iterator_tag, typename std::iterator_traits< decltype(Range.begin())>::iterator_category >::value, void > *=nullptr)
Get the size of a range.
auto enumerate(FirstRange &&First, RestRanges &&...Rest)
Given two or more input ranges, returns a new range whose values are are tuples (A,...
Error write(MCStreamer &Out, ArrayRef< std::string > Inputs, OnCuIndexOverflow OverflowOptValue)
void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
@ Ref
The access may reference the value stored in memory.
uint64_t alignTo(uint64_t Size, Align A)
Returns a multiple of A needed to store Size bytes.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
unsigned encodeULEB128(uint64_t Value, raw_ostream &OS, unsigned PadTo=0)
Utility function to encode a ULEB128 value to an output stream.
Implement std::hash so that hash_code can be used in STL containers.
This struct is a compact representation of a valid (non-zero power of two) alignment.
uint64_t value() const
This is a hole in the type system and should not be abused.
void setSymbolAndType(Elf32_Word s, unsigned char t)
void setSymbolAndType(Elf64_Word s, Elf64_Word t)
@ FKF_IsPCRel
Is this fixup kind PCrelative? This is used by the assembler backend to evaluate fixup values in a ta...
unsigned Flags
Flags describing additional information on this fixup kind.
This struct is a compact representation of a valid (power of two) or undefined (0) alignment.
Adapter to write values to a stream in a particular byte order.