16#define DEBUG_TYPE "jitlink"
29 return make_error<JITLinkError>(
"Object is not a relocatable MachO");
31 if (
auto Err = createNormalizedSections())
32 return std::move(Err);
34 if (
auto Err = createNormalizedSymbols())
35 return std::move(Err);
37 if (
auto Err = graphifyRegularSymbols())
38 return std::move(Err);
40 if (
auto Err = graphifySectionsWithCustomParsers())
41 return std::move(Err);
44 return std::move(Err);
64 "Custom parser for this section already exists");
65 CustomSectionParserFunctions[
SectionName] = std::move(Parser);
90 strcmp(NSec.
SegName,
"__DWARF") == 0);
115Section &MachOLinkGraphBuilder::getCommonSection() {
119 return *CommonSection;
122Error MachOLinkGraphBuilder::createNormalizedSections() {
128 for (
auto &SecRef : Obj.
sections()) {
129 NormalizedSection NSec;
135 const MachO::section_64 &Sec64 =
138 memcpy(&NSec.SectName, &Sec64.sectname, 16);
139 NSec.SectName[16] =
'\0';
140 memcpy(&NSec.SegName, Sec64.segname, 16);
141 NSec.SegName[16] =
'\0';
143 NSec.Address = orc::ExecutorAddr(Sec64.addr);
144 NSec.Size = Sec64.size;
145 NSec.Alignment = 1ULL << Sec64.align;
146 NSec.Flags = Sec64.flags;
147 DataOffset = Sec64.offset;
149 const MachO::section &Sec32 = Obj.
getSection(SecRef.getRawDataRefImpl());
151 memcpy(&NSec.SectName, &Sec32.sectname, 16);
152 NSec.SectName[16] =
'\0';
153 memcpy(&NSec.SegName, Sec32.segname, 16);
154 NSec.SegName[16] =
'\0';
156 NSec.Address = orc::ExecutorAddr(Sec32.addr);
157 NSec.Size = Sec32.size;
158 NSec.Alignment = 1ULL << Sec32.align;
159 NSec.Flags = Sec32.flags;
160 DataOffset = Sec32.offset;
164 dbgs() <<
" " << NSec.SegName <<
"," << NSec.SectName <<
": "
165 <<
formatv(
"{0:x16}", NSec.Address) <<
" -- "
166 <<
formatv(
"{0:x16}", NSec.Address + NSec.Size)
167 <<
", align: " << NSec.Alignment <<
", index: " << SecIndex
174 return make_error<JITLinkError>(
175 "Section data extends past end of file");
189 auto FullyQualifiedName =
190 G->allocateContent(StringRef(NSec.SegName) +
"," + NSec.SectName);
191 NSec.GraphSection = &G->createSection(
192 StringRef(FullyQualifiedName.data(), FullyQualifiedName.size()), Prot);
198 IndexToSection.insert(std::make_pair(SecIndex, std::move(NSec)));
201 std::vector<NormalizedSection *> Sections;
202 Sections.reserve(IndexToSection.size());
203 for (
auto &KV : IndexToSection)
204 Sections.push_back(&KV.second);
208 if (Sections.empty())
212 [](
const NormalizedSection *
LHS,
const NormalizedSection *
RHS) {
214 if (
LHS->Address !=
RHS->Address)
215 return LHS->Address <
RHS->Address;
216 return LHS->Size <
RHS->Size;
219 for (
unsigned I = 0,
E = Sections.size() - 1;
I !=
E; ++
I) {
220 auto &Cur = *Sections[
I];
221 auto &Next = *Sections[
I + 1];
222 if (Next.Address < Cur.Address + Cur.Size)
223 return make_error<JITLinkError>(
224 "Address range for section " +
225 formatv(
"\"{0}/{1}\" [ {2:x16} -- {3:x16} ] ", Cur.SegName,
226 Cur.SectName, Cur.Address, Cur.Address + Cur.Size) +
227 "overlaps section \"" + Next.SegName +
"/" + Next.SectName +
"\"" +
228 formatv(
"\"{0}/{1}\" [ {2:x16} -- {3:x16} ] ", Next.SegName,
229 Next.SectName, Next.Address, Next.Address + Next.Size));
235Error MachOLinkGraphBuilder::createNormalizedSymbols() {
238 for (
auto &SymRef : Obj.
symbols()) {
240 unsigned SymbolIndex = Obj.
getSymbolIndex(SymRef.getRawDataRefImpl());
248 const MachO::nlist_64 &NL64 =
250 Value = NL64.n_value;
256 const MachO::nlist &NL32 =
258 Value = NL32.n_value;
270 std::optional<StringRef>
Name;
272 if (
auto NameOrErr = SymRef.getName())
275 return NameOrErr.takeError();
277 return make_error<JITLinkError>(
"Symbol at index " +
279 " has no name (string table index 0), "
280 "but N_EXT bit is set");
285 dbgs() <<
"<anonymous symbol>";
288 dbgs() <<
": value = " <<
formatv(
"{0:x16}", Value)
289 <<
", type = " <<
formatv(
"{0:x2}", Type)
290 <<
", desc = " <<
formatv(
"{0:x4}",
Desc) <<
", sect = ";
292 dbgs() <<
static_cast<unsigned>(Sect - 1);
302 return NSec.takeError();
304 if (orc::ExecutorAddr(Value) < NSec->Address ||
305 orc::ExecutorAddr(Value) > NSec->Address + NSec->Size)
306 return make_error<JITLinkError>(
"Address " +
formatv(
"{0:x}", Value) +
307 " for symbol " + *
Name +
308 " does not fall within section");
310 if (!NSec->GraphSection) {
312 dbgs() <<
" Skipping: Symbol is in section " << NSec->SegName <<
"/"
314 <<
" which has no associated graph section.\n";
320 IndexToSymbol[SymbolIndex] =
328void MachOLinkGraphBuilder::addSectionStartSymAndBlock(
329 unsigned SecIndex, Section &GraphSec, orc::ExecutorAddr
Address,
333 Data ? G->createContentBlock(GraphSec, ArrayRef<char>(
Data,
Size),
335 : G->createZeroFillBlock(GraphSec,
Size,
Address, Alignment, 0);
336 auto &
Sym = G->addAnonymousSymbol(
B, 0,
Size,
false, IsLive);
337 auto SecI = IndexToSection.find(SecIndex);
338 assert(SecI != IndexToSection.end() &&
"SecIndex invalid");
339 auto &NSec = SecI->second;
340 assert(!NSec.CanonicalSymbols.count(
Sym.getAddress()) &&
341 "Anonymous block start symbol clashes with existing symbol address");
342 NSec.CanonicalSymbols[
Sym.getAddress()] = &
Sym;
345Error MachOLinkGraphBuilder::graphifyRegularSymbols() {
350 std::vector<std::vector<NormalizedSymbol *>> SecIndexToSymbols;
351 SecIndexToSymbols.resize(256);
355 for (
auto &KV : IndexToSymbol) {
356 auto &NSym = *KV.second;
362 return make_error<JITLinkError>(
"Anonymous common symbol at index " +
364 NSym.GraphSymbol = &G->addDefinedSymbol(
365 G->createZeroFillBlock(getCommonSection(),
373 return make_error<JITLinkError>(
"Anonymous external symbol at "
376 NSym.GraphSymbol = &G->addExternalSymbol(
382 return make_error<JITLinkError>(
"Anonymous absolute symbol at index " +
384 NSym.GraphSymbol = &G->addAbsoluteSymbol(
389 SecIndexToSymbols[NSym.Sect - 1].push_back(&NSym);
392 return make_error<JITLinkError>(
393 "Unupported N_PBUD symbol " +
394 (NSym.Name ? (
"\"" + *NSym.Name +
"\"") : Twine(
"<anon>")) +
395 " at index " + Twine(KV.first));
397 return make_error<JITLinkError>(
398 "Unupported N_INDR symbol " +
399 (NSym.Name ? (
"\"" + *NSym.Name +
"\"") : Twine(
"<anon>")) +
400 " at index " + Twine(KV.first));
402 return make_error<JITLinkError>(
403 "Unrecognized symbol type " + Twine(NSym.Type &
MachO::N_TYPE) +
405 (NSym.Name ? (
"\"" + *NSym.Name +
"\"") : Twine(
"<anon>")) +
406 " at index " + Twine(KV.first));
412 for (
auto &KV : IndexToSection) {
413 auto SecIndex = KV.first;
414 auto &NSec = KV.second;
416 if (!NSec.GraphSection) {
418 dbgs() <<
" " << NSec.SegName <<
"/" << NSec.SectName
419 <<
" has no graph section. Skipping.\n";
425 if (CustomSectionParserFunctions.
count(NSec.GraphSection->getName())) {
427 dbgs() <<
" Skipping section " << NSec.GraphSection->getName()
428 <<
" as it has a custom parser.\n";
433 if (
auto Err = graphifyCStringSection(
434 NSec, std::move(SecIndexToSymbols[SecIndex])))
439 dbgs() <<
" Graphifying regular section "
440 << NSec.GraphSection->getName() <<
"...\n";
446 auto &SecNSymStack = SecIndexToSymbols[SecIndex];
450 if (SecNSymStack.empty()) {
453 dbgs() <<
" Section non-empty, but contains no symbols. "
454 "Creating anonymous block to cover "
455 <<
formatv(
"{0:x16}", NSec.Address) <<
" -- "
456 <<
formatv(
"{0:x16}", NSec.Address + NSec.Size) <<
"\n";
458 addSectionStartSymAndBlock(SecIndex, *NSec.GraphSection, NSec.Address,
459 NSec.Data, NSec.Size, NSec.Alignment,
460 SectionIsNoDeadStrip);
463 dbgs() <<
" Section empty and contains no symbols. Skipping.\n";
472 const NormalizedSymbol *
RHS) {
473 if (
LHS->Value !=
RHS->Value)
474 return LHS->Value >
RHS->Value;
478 return static_cast<uint8_t
>(
LHS->S) <
static_cast<uint8_t
>(
RHS->S);
479 return LHS->Name <
RHS->Name;
483 if (!SecNSymStack.empty() &&
isAltEntry(*SecNSymStack.back()))
484 return make_error<JITLinkError>(
485 "First symbol in " + NSec.GraphSection->getName() +
" is alt-entry");
489 if (orc::ExecutorAddr(SecNSymStack.back()->Value) != NSec.Address) {
491 orc::ExecutorAddr(SecNSymStack.back()->Value) - NSec.Address;
493 dbgs() <<
" Section start not covered by symbol. "
494 <<
"Creating anonymous block to cover [ " << NSec.Address
495 <<
" -- " << (NSec.Address + AnonBlockSize) <<
" ]\n";
497 addSectionStartSymAndBlock(SecIndex, *NSec.GraphSection, NSec.Address,
498 NSec.Data, AnonBlockSize, NSec.Alignment,
499 SectionIsNoDeadStrip);
510 while (!SecNSymStack.empty()) {
511 SmallVector<NormalizedSymbol *, 8> BlockSyms;
515 BlockSyms.push_back(SecNSymStack.back());
516 SecNSymStack.pop_back();
517 while (!SecNSymStack.empty() &&
519 SecNSymStack.back()->Value == BlockSyms.back()->Value ||
520 !SubsectionsViaSymbols)) {
521 BlockSyms.push_back(SecNSymStack.back());
522 SecNSymStack.pop_back();
526 auto BlockStart = orc::ExecutorAddr(BlockSyms.front()->Value);
527 orc::ExecutorAddr BlockEnd =
528 SecNSymStack.empty() ? NSec.Address + NSec.Size
529 : orc::ExecutorAddr(SecNSymStack.back()->Value);
534 dbgs() <<
" Creating block for " <<
formatv(
"{0:x16}", BlockStart)
535 <<
" -- " <<
formatv(
"{0:x16}", BlockEnd) <<
": "
536 << NSec.GraphSection->getName() <<
" + "
537 <<
formatv(
"{0:x16}", BlockOffset) <<
" with "
538 << BlockSyms.size() <<
" symbol(s)...\n";
543 ? G->createContentBlock(
545 ArrayRef<char>(NSec.Data + BlockOffset,
BlockSize),
546 BlockStart, NSec.Alignment, BlockStart % NSec.Alignment)
547 : G->createZeroFillBlock(*NSec.GraphSection,
BlockSize,
548 BlockStart, NSec.Alignment,
549 BlockStart % NSec.Alignment);
551 std::optional<orc::ExecutorAddr> LastCanonicalAddr;
552 auto SymEnd = BlockEnd;
553 while (!BlockSyms.empty()) {
554 auto &NSym = *BlockSyms.back();
555 BlockSyms.pop_back();
560 auto &
Sym = createStandardGraphSymbol(
561 NSym,
B, SymEnd - orc::ExecutorAddr(NSym.Value), SectionIsText,
562 SymLive, LastCanonicalAddr != orc::ExecutorAddr(NSym.Value));
564 if (LastCanonicalAddr !=
Sym.getAddress()) {
565 if (LastCanonicalAddr)
566 SymEnd = *LastCanonicalAddr;
567 LastCanonicalAddr =
Sym.getAddress();
576Symbol &MachOLinkGraphBuilder::createStandardGraphSymbol(NormalizedSymbol &NSym,
577 Block &
B,
size_t Size,
583 dbgs() <<
" " <<
formatv(
"{0:x16}", NSym.Value) <<
" -- "
586 dbgs() <<
"<anonymous symbol>";
592 dbgs() <<
" [no-dead-strip]";
594 dbgs() <<
" [non-canonical]";
598 auto SymOffset = orc::ExecutorAddr(NSym.Value) -
B.getAddress();
601 ? G->addDefinedSymbol(
B, SymOffset, *NSym.Name,
Size, NSym.L, NSym.S,
602 IsText, IsNoDeadStrip)
603 : G->addAnonymousSymbol(
B, SymOffset,
Size, IsText, IsNoDeadStrip);
604 NSym.GraphSymbol = &
Sym;
612Error MachOLinkGraphBuilder::graphifySectionsWithCustomParsers() {
614 for (
auto &KV : IndexToSection) {
615 auto &NSec = KV.second;
618 if (!NSec.GraphSection)
621 auto HI = CustomSectionParserFunctions.
find(NSec.GraphSection->getName());
622 if (HI != CustomSectionParserFunctions.
end()) {
623 auto &Parse =
HI->second;
624 if (
auto Err = Parse(NSec))
632Error MachOLinkGraphBuilder::graphifyCStringSection(
633 NormalizedSection &NSec, std::vector<NormalizedSymbol *> NSyms) {
634 assert(NSec.GraphSection &&
"C string literal section missing graph section");
635 assert(NSec.Data &&
"C string literal section has no data");
638 dbgs() <<
" Graphifying C-string literal section "
639 << NSec.GraphSection->getName() <<
"\n";
642 if (NSec.Data[NSec.Size - 1] !=
'\0')
643 return make_error<JITLinkError>(
"C string literal section " +
644 NSec.GraphSection->getName() +
645 " does not end with null terminator");
649 [](
const NormalizedSymbol *
LHS,
const NormalizedSymbol *
RHS) {
650 if (
LHS->Value !=
RHS->Value)
651 return LHS->Value >
RHS->Value;
659 return *LHS->Name > *RHS->Name;
669 for (
size_t I = 0;
I != NSec.Size; ++
I) {
670 if (NSec.Data[
I] ==
'\0') {
673 auto &
B = G->createContentBlock(*NSec.GraphSection,
674 {NSec.Data + BlockStart, BlockSize},
675 NSec.Address + BlockStart, NSec.Alignment,
676 BlockStart % NSec.Alignment);
679 dbgs() <<
" Created block " <<
B.getRange()
680 <<
", align = " <<
B.getAlignment()
681 <<
", align-ofs = " <<
B.getAlignmentOffset() <<
" for \"";
682 for (
size_t J = 0; J != std::min(
B.getSize(),
size_t(16)); ++J)
683 switch (
B.getContent()[J]) {
685 case '\n':
dbgs() <<
"\\n";
break;
686 case '\t':
dbgs() <<
"\\t";
break;
687 default:
dbgs() <<
B.getContent()[J];
break;
689 if (
B.getSize() > 16)
696 orc::ExecutorAddr(NSyms.back()->Value) !=
B.getAddress()) {
697 auto &S = G->addAnonymousSymbol(
B, 0,
BlockSize,
false,
false);
698 setCanonicalSymbol(NSec, S);
700 dbgs() <<
" Adding symbol for c-string block " <<
B.getRange()
701 <<
": <anonymous symbol> at offset 0\n";
706 auto LastCanonicalAddr =
B.getAddress() +
BlockSize;
707 while (!NSyms.empty() && orc::ExecutorAddr(NSyms.back()->Value) <
709 auto &NSym = *NSyms.back();
710 size_t SymSize = (
B.getAddress() +
BlockSize) -
711 orc::ExecutorAddr(NSyms.back()->Value);
715 bool IsCanonical =
false;
716 if (LastCanonicalAddr != orc::ExecutorAddr(NSym.Value)) {
718 LastCanonicalAddr = orc::ExecutorAddr(NSym.Value);
721 auto &
Sym = createStandardGraphSymbol(NSym,
B, SymSize, SectionIsText,
722 SymLive, IsCanonical);
725 dbgs() <<
" Adding symbol for c-string block " <<
B.getRange()
727 << (
Sym.hasName() ?
Sym.getName() :
"<anonymous symbol>")
728 <<
" at offset " <<
formatv(
"{0:x}",
Sym.getOffset()) <<
"\n";
739 [](Block *
B) { return isCStringBlock(*B); }) &&
740 "All blocks in section should hold single c-strings");
746 auto *CUSec =
G.findSectionByName(CompactUnwindSectionName);
750 if (!
G.getTargetTriple().isOSBinFormatMachO())
751 return make_error<JITLinkError>(
752 "Error linking " +
G.getName() +
753 ": compact unwind splitting not supported on non-macho target " +
754 G.getTargetTriple().str());
756 unsigned CURecordSize = 0;
757 unsigned PersonalityEdgeOffset = 0;
758 unsigned LSDAEdgeOffset = 0;
759 switch (
G.getTargetTriple().getArch()) {
769 PersonalityEdgeOffset = 16;
773 return make_error<JITLinkError>(
774 "Error linking " +
G.getName() +
775 ": compact unwind splitting not supported on " +
776 G.getTargetTriple().getArchName());
779 std::vector<Block *> OriginalBlocks(CUSec->blocks().begin(),
780 CUSec->blocks().end());
782 dbgs() <<
"In " <<
G.getName() <<
" splitting compact unwind section "
783 << CompactUnwindSectionName <<
" containing "
784 << OriginalBlocks.
size() <<
" initial blocks...\n";
787 while (!OriginalBlocks.empty()) {
788 auto *
B = OriginalBlocks.back();
789 OriginalBlocks.pop_back();
791 if (
B->getSize() == 0) {
793 dbgs() <<
" Skipping empty block at "
794 <<
formatv(
"{0:x16}",
B->getAddress()) <<
"\n";
800 dbgs() <<
" Splitting block at " <<
formatv(
"{0:x16}",
B->getAddress())
801 <<
" into " << (
B->getSize() / CURecordSize)
802 <<
" compact unwind record(s)\n";
805 if (
B->getSize() % CURecordSize)
806 return make_error<JITLinkError>(
807 "Error splitting compact unwind record in " +
G.getName() +
808 ": block at " +
formatv(
"{0:x}",
B->getAddress()) +
" has size " +
810 " (not a multiple of CU record size of " +
811 formatv(
"{0:x}", CURecordSize) +
")");
813 unsigned NumBlocks =
B->getSize() / CURecordSize;
816 for (
unsigned I = 0;
I != NumBlocks; ++
I) {
817 auto &CURec =
G.splitBlock(*
B, CURecordSize, &
C);
818 bool AddedKeepAlive =
false;
820 for (
auto &
E : CURec.edges()) {
821 if (
E.getOffset() == 0) {
823 dbgs() <<
" Updating compact unwind record at "
824 <<
formatv(
"{0:x16}", CURec.getAddress()) <<
" to point to "
825 << (
E.getTarget().hasName() ?
E.getTarget().getName()
827 <<
" (at " <<
formatv(
"{0:x16}",
E.getTarget().getAddress())
831 if (
E.getTarget().isExternal())
832 return make_error<JITLinkError>(
833 "Error adding keep-alive edge for compact unwind record at " +
834 formatv(
"{0:x}", CURec.getAddress()) +
": target " +
835 E.getTarget().getName() +
" is an external symbol");
836 auto &TgtBlock =
E.getTarget().getBlock();
838 G.addAnonymousSymbol(CURec, 0, CURecordSize,
false,
false);
840 AddedKeepAlive =
true;
841 }
else if (
E.getOffset() != PersonalityEdgeOffset &&
842 E.getOffset() != LSDAEdgeOffset)
843 return make_error<JITLinkError>(
"Unexpected edge at offset " +
845 " in compact unwind record at " +
846 formatv(
"{0:x}", CURec.getAddress()));
850 return make_error<JITLinkError>(
851 "Error adding keep-alive edge for compact unwind record at " +
852 formatv(
"{0:x}", CURec.getAddress()) +
853 ": no outgoing target edge at offset 0");
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
static const char * CommonSectionName
static Expected< StringRef > getFileName(const DebugStringTableSubsectionRef &Strings, const DebugChecksumsSubsectionRef &Checksums, uint32_t FileID)
static std::optional< TypeSize > getPointerSize(const Value *V, const DataLayout &DL, const TargetLibraryInfo &TLI, const Function *F)
static const char * CommonSectionName
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static const int BlockSize
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
iterator find(StringRef Key)
size_type count(StringRef Key) const
count - Return 1 if the element is in the map, 0 otherwise.
StringRef - Represent a constant reference to a string, i.e.
constexpr size_t size() const
size - Get the string size.
constexpr const char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
Manages the enabling and disabling of subtarget specific features.
Triple - Helper class for working with autoconf configuration names.
The instances of the Type class are immutable: once they are created, they are never changed.
Error operator()(LinkGraph &G)
std::optional< SmallVector< Symbol *, 8 > > SplitBlockCache
Cache type for the splitBlock function.
const char *(*)(Edge::Kind) GetEdgeKindNameFunction
static bool isDebugSection(const NormalizedSection &NSec)
void addCustomSectionParser(StringRef SectionName, SectionParserFunction Parse)
virtual ~MachOLinkGraphBuilder()
virtual Error addRelocations()=0
std::function< Error(NormalizedSection &S)> SectionParserFunction
static Scope getScope(StringRef Name, uint8_t Type)
static bool isZeroFillSection(const NormalizedSection &NSec)
Expected< std::unique_ptr< LinkGraph > > buildGraph()
NormalizedSection & getSectionByIndex(unsigned Index)
Index is zero-based (MachO section indexes are usually one-based) and assumed to be in-range.
MachOLinkGraphBuilder(const object::MachOObjectFile &Obj, Triple TT, SubtargetFeatures Features, LinkGraph::GetEdgeKindNameFunction GetEdgeKindName)
NormalizedSymbol & createNormalizedSymbol(ArgTs &&... Args)
Create a symbol.
static Linkage getLinkage(uint16_t Desc)
static bool isAltEntry(const NormalizedSymbol &NSym)
Expected< NormalizedSection & > findSectionByIndex(unsigned Index)
Try to get the section at the given index.
StringRef getData() const
bool isLittleEndian() const
const MachO::mach_header_64 & getHeader64() const
Expected< SectionRef > getSection(unsigned SectionIndex) const
uint64_t getSymbolIndex(DataRefImpl Symb) const
MachO::nlist getSymbolTableEntry(DataRefImpl DRI) const
MachO::section_64 getSection64(DataRefImpl DRI) const
bool isRelocatableObject() const override
True if this is a relocatable object (.o/.obj).
MachO::nlist_64 getSymbol64TableEntry(DataRefImpl DRI) const
bool is64Bit() const override
uint64_t getSectionIndex(DataRefImpl Sec) const override
section_iterator_range sections() const
symbol_iterator_range symbols() const
@ C
The default llvm calling convention, compatible with C.
@ S_ATTR_DEBUG
S_ATTR_DEBUG - A debug section.
@ S_ATTR_NO_DEAD_STRIP
S_ATTR_NO_DEAD_STRIP - No dead stripping.
@ S_ATTR_PURE_INSTRUCTIONS
S_ATTR_PURE_INSTRUCTIONS - Section contains only true machine instructions.
@ S_GB_ZEROFILL
S_GB_ZEROFILL - Zero fill on demand section (that can be larger than 4 gigabytes).
@ S_THREAD_LOCAL_ZEROFILL
S_THREAD_LOCAL_ZEROFILL - Thread local zerofill section.
@ S_CSTRING_LITERALS
S_CSTRING_LITERALS - Section with literal C strings.
@ S_ZEROFILL
S_ZEROFILL - Zero fill on demand section.
uint8_t GET_COMM_ALIGN(uint16_t n_desc)
@ MH_SUBSECTIONS_VIA_SYMBOLS
Linkage
Describes symbol linkage. This can be used to resolve definition clashes.
Scope
Defines the scope in which this symbol should be visible: Default – Visible in the public interface o...
Type
MessagePack types as defined in the standard, with the exception of Integer being divided into a sign...
MemProt
Describes Read/Write/Exec permissions for memory.
uint64_t ExecutorAddrDiff
@ NoAlloc
NoAlloc memory should not be allocated by the JITLinkMemoryManager at all.
NodeAddr< BlockNode * > Block
This is an optimization pass for GlobalISel generic memory operations.
bool all_of(R &&range, UnaryPredicate P)
Provide wrappers to std::all_of which take ranges instead of having to pass begin/end explicitly.
auto formatv(const char *Fmt, Ts &&...Vals) -> formatv_object< decltype(std::make_tuple(support::detail::build_format_adapter(std::forward< Ts >(Vals))...))>
void sort(IteratorTy Start, IteratorTy End)
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.
Description of the encoding of one expression Op.