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);
55 getEndianness(Obj),
std::
move(GetEdgeKindName))) {
63 "Custom parser for this section already exists");
64 CustomSectionParserFunctions[
SectionName] = std::move(Parser);
89 strcmp(NSec.
SegName,
"__DWARF") == 0);
113Section &MachOLinkGraphBuilder::getCommonSection() {
117 return *CommonSection;
120Error MachOLinkGraphBuilder::createNormalizedSections() {
126 for (
auto &SecRef : Obj.
sections()) {
127 NormalizedSection NSec;
133 const MachO::section_64 &Sec64 =
136 memcpy(&NSec.SectName, &Sec64.sectname, 16);
137 NSec.SectName[16] =
'\0';
138 memcpy(&NSec.SegName, Sec64.segname, 16);
139 NSec.SegName[16] =
'\0';
141 NSec.Address = orc::ExecutorAddr(Sec64.addr);
142 NSec.Size = Sec64.size;
143 NSec.Alignment = 1ULL << Sec64.align;
144 NSec.Flags = Sec64.flags;
145 DataOffset = Sec64.offset;
147 const MachO::section &Sec32 = Obj.
getSection(SecRef.getRawDataRefImpl());
149 memcpy(&NSec.SectName, &Sec32.sectname, 16);
150 NSec.SectName[16] =
'\0';
151 memcpy(&NSec.SegName, Sec32.segname, 16);
152 NSec.SegName[16] =
'\0';
154 NSec.Address = orc::ExecutorAddr(Sec32.addr);
155 NSec.Size = Sec32.size;
156 NSec.Alignment = 1ULL << Sec32.align;
157 NSec.Flags = Sec32.flags;
158 DataOffset = Sec32.offset;
162 dbgs() <<
" " << NSec.SegName <<
"," << NSec.SectName <<
": "
163 <<
formatv(
"{0:x16}", NSec.Address) <<
" -- "
164 <<
formatv(
"{0:x16}", NSec.Address + NSec.Size)
165 <<
", align: " << NSec.Alignment <<
", index: " << SecIndex
172 return make_error<JITLinkError>(
173 "Section data extends past end of file");
187 auto FullyQualifiedName =
188 G->allocateContent(StringRef(NSec.SegName) +
"," + NSec.SectName);
189 NSec.GraphSection = &G->createSection(
190 StringRef(FullyQualifiedName.data(), FullyQualifiedName.size()), Prot);
196 IndexToSection.insert(std::make_pair(SecIndex, std::move(NSec)));
199 std::vector<NormalizedSection *> Sections;
200 Sections.reserve(IndexToSection.size());
201 for (
auto &KV : IndexToSection)
202 Sections.push_back(&KV.second);
206 if (Sections.empty())
210 [](
const NormalizedSection *
LHS,
const NormalizedSection *
RHS) {
212 if (
LHS->Address !=
RHS->Address)
213 return LHS->Address <
RHS->Address;
214 return LHS->Size <
RHS->Size;
217 for (
unsigned I = 0,
E = Sections.size() - 1;
I !=
E; ++
I) {
218 auto &Cur = *Sections[
I];
219 auto &Next = *Sections[
I + 1];
220 if (Next.Address < Cur.Address + Cur.Size)
221 return make_error<JITLinkError>(
222 "Address range for section " +
223 formatv(
"\"{0}/{1}\" [ {2:x16} -- {3:x16} ] ", Cur.SegName,
224 Cur.SectName, Cur.Address, Cur.Address + Cur.Size) +
225 "overlaps section \"" + Next.SegName +
"/" + Next.SectName +
"\"" +
226 formatv(
"\"{0}/{1}\" [ {2:x16} -- {3:x16} ] ", Next.SegName,
227 Next.SectName, Next.Address, Next.Address + Next.Size));
233Error MachOLinkGraphBuilder::createNormalizedSymbols() {
236 for (
auto &SymRef : Obj.
symbols()) {
238 unsigned SymbolIndex = Obj.
getSymbolIndex(SymRef.getRawDataRefImpl());
246 const MachO::nlist_64 &NL64 =
248 Value = NL64.n_value;
254 const MachO::nlist &NL32 =
256 Value = NL32.n_value;
268 std::optional<StringRef>
Name;
270 if (
auto NameOrErr = SymRef.getName())
273 return NameOrErr.takeError();
275 return make_error<JITLinkError>(
"Symbol at index " +
277 " has no name (string table index 0), "
278 "but N_EXT bit is set");
283 dbgs() <<
"<anonymous symbol>";
286 dbgs() <<
": value = " <<
formatv(
"{0:x16}", Value)
287 <<
", type = " <<
formatv(
"{0:x2}", Type)
288 <<
", desc = " <<
formatv(
"{0:x4}", Desc) <<
", sect = ";
290 dbgs() <<
static_cast<unsigned>(Sect - 1);
300 return NSec.takeError();
302 if (orc::ExecutorAddr(Value) < NSec->Address ||
303 orc::ExecutorAddr(Value) > NSec->Address + NSec->Size)
304 return make_error<JITLinkError>(
"Address " +
formatv(
"{0:x}", Value) +
305 " for symbol " + *
Name +
306 " does not fall within section");
308 if (!NSec->GraphSection) {
310 dbgs() <<
" Skipping: Symbol is in section " << NSec->SegName <<
"/"
312 <<
" which has no associated graph section.\n";
318 IndexToSymbol[SymbolIndex] =
326void MachOLinkGraphBuilder::addSectionStartSymAndBlock(
327 unsigned SecIndex, Section &GraphSec, orc::ExecutorAddr
Address,
331 Data ? G->createContentBlock(GraphSec, ArrayRef<char>(
Data,
Size),
333 : G->createZeroFillBlock(GraphSec,
Size,
Address, Alignment, 0);
334 auto &Sym = G->addAnonymousSymbol(
B, 0,
Size,
false, IsLive);
335 auto SecI = IndexToSection.find(SecIndex);
336 assert(SecI != IndexToSection.end() &&
"SecIndex invalid");
337 auto &NSec = SecI->second;
338 assert(!NSec.CanonicalSymbols.count(Sym.getAddress()) &&
339 "Anonymous block start symbol clashes with existing symbol address");
340 NSec.CanonicalSymbols[Sym.getAddress()] = &Sym;
343Error MachOLinkGraphBuilder::graphifyRegularSymbols() {
348 std::vector<std::vector<NormalizedSymbol *>> SecIndexToSymbols;
349 SecIndexToSymbols.resize(256);
353 for (
auto &KV : IndexToSymbol) {
354 auto &NSym = *KV.second;
360 return make_error<JITLinkError>(
"Anonymous common symbol at index " +
362 NSym.GraphSymbol = &G->addDefinedSymbol(
363 G->createZeroFillBlock(getCommonSection(),
371 return make_error<JITLinkError>(
"Anonymous external symbol at "
374 NSym.GraphSymbol = &G->addExternalSymbol(
380 return make_error<JITLinkError>(
"Anonymous absolute symbol at index " +
382 NSym.GraphSymbol = &G->addAbsoluteSymbol(
387 SecIndexToSymbols[NSym.Sect - 1].push_back(&NSym);
390 return make_error<JITLinkError>(
391 "Unupported N_PBUD symbol " +
392 (NSym.Name ? (
"\"" + *NSym.Name +
"\"") : Twine(
"<anon>")) +
393 " at index " + Twine(KV.first));
395 return make_error<JITLinkError>(
396 "Unupported N_INDR symbol " +
397 (NSym.Name ? (
"\"" + *NSym.Name +
"\"") : Twine(
"<anon>")) +
398 " at index " + Twine(KV.first));
400 return make_error<JITLinkError>(
401 "Unrecognized symbol type " + Twine(NSym.Type &
MachO::N_TYPE) +
403 (NSym.Name ? (
"\"" + *NSym.Name +
"\"") : Twine(
"<anon>")) +
404 " at index " + Twine(KV.first));
410 for (
auto &KV : IndexToSection) {
411 auto SecIndex = KV.first;
412 auto &NSec = KV.second;
414 if (!NSec.GraphSection) {
416 dbgs() <<
" " << NSec.SegName <<
"/" << NSec.SectName
417 <<
" has no graph section. Skipping.\n";
423 if (CustomSectionParserFunctions.
count(NSec.GraphSection->getName())) {
425 dbgs() <<
" Skipping section " << NSec.GraphSection->getName()
426 <<
" as it has a custom parser.\n";
431 if (
auto Err = graphifyCStringSection(
432 NSec, std::move(SecIndexToSymbols[SecIndex])))
437 dbgs() <<
" Graphifying regular section "
438 << NSec.GraphSection->getName() <<
"...\n";
444 auto &SecNSymStack = SecIndexToSymbols[SecIndex];
448 if (SecNSymStack.empty()) {
451 dbgs() <<
" Section non-empty, but contains no symbols. "
452 "Creating anonymous block to cover "
453 <<
formatv(
"{0:x16}", NSec.Address) <<
" -- "
454 <<
formatv(
"{0:x16}", NSec.Address + NSec.Size) <<
"\n";
456 addSectionStartSymAndBlock(SecIndex, *NSec.GraphSection, NSec.Address,
457 NSec.Data, NSec.Size, NSec.Alignment,
458 SectionIsNoDeadStrip);
461 dbgs() <<
" Section empty and contains no symbols. Skipping.\n";
470 const NormalizedSymbol *
RHS) {
471 if (
LHS->Value !=
RHS->Value)
472 return LHS->Value >
RHS->Value;
476 return static_cast<uint8_t
>(
LHS->S) <
static_cast<uint8_t
>(
RHS->S);
477 return LHS->Name <
RHS->Name;
481 if (!SecNSymStack.empty() &&
isAltEntry(*SecNSymStack.back()))
482 return make_error<JITLinkError>(
483 "First symbol in " + NSec.GraphSection->getName() +
" is alt-entry");
487 if (orc::ExecutorAddr(SecNSymStack.back()->Value) != NSec.Address) {
489 orc::ExecutorAddr(SecNSymStack.back()->Value) - NSec.Address;
491 dbgs() <<
" Section start not covered by symbol. "
492 <<
"Creating anonymous block to cover [ " << NSec.Address
493 <<
" -- " << (NSec.Address + AnonBlockSize) <<
" ]\n";
495 addSectionStartSymAndBlock(SecIndex, *NSec.GraphSection, NSec.Address,
496 NSec.Data, AnonBlockSize, NSec.Alignment,
497 SectionIsNoDeadStrip);
508 while (!SecNSymStack.empty()) {
509 SmallVector<NormalizedSymbol *, 8> BlockSyms;
513 BlockSyms.push_back(SecNSymStack.back());
514 SecNSymStack.pop_back();
515 while (!SecNSymStack.empty() &&
517 SecNSymStack.back()->Value == BlockSyms.back()->Value ||
518 !SubsectionsViaSymbols)) {
519 BlockSyms.push_back(SecNSymStack.back());
520 SecNSymStack.pop_back();
524 auto BlockStart = orc::ExecutorAddr(BlockSyms.front()->Value);
525 orc::ExecutorAddr BlockEnd =
526 SecNSymStack.empty() ? NSec.Address + NSec.Size
527 : orc::ExecutorAddr(SecNSymStack.back()->Value);
532 dbgs() <<
" Creating block for " <<
formatv(
"{0:x16}", BlockStart)
533 <<
" -- " <<
formatv(
"{0:x16}", BlockEnd) <<
": "
534 << NSec.GraphSection->getName() <<
" + "
535 <<
formatv(
"{0:x16}", BlockOffset) <<
" with "
536 << BlockSyms.size() <<
" symbol(s)...\n";
541 ? G->createContentBlock(
543 ArrayRef<char>(NSec.Data + BlockOffset,
BlockSize),
544 BlockStart, NSec.Alignment, BlockStart % NSec.Alignment)
545 : G->createZeroFillBlock(*NSec.GraphSection,
BlockSize,
546 BlockStart, NSec.Alignment,
547 BlockStart % NSec.Alignment);
549 std::optional<orc::ExecutorAddr> LastCanonicalAddr;
550 auto SymEnd = BlockEnd;
551 while (!BlockSyms.empty()) {
552 auto &NSym = *BlockSyms.back();
553 BlockSyms.pop_back();
558 auto &Sym = createStandardGraphSymbol(
559 NSym,
B, SymEnd - orc::ExecutorAddr(NSym.Value), SectionIsText,
560 SymLive, LastCanonicalAddr != orc::ExecutorAddr(NSym.Value));
562 if (LastCanonicalAddr != Sym.getAddress()) {
563 if (LastCanonicalAddr)
564 SymEnd = *LastCanonicalAddr;
565 LastCanonicalAddr = Sym.getAddress();
574Symbol &MachOLinkGraphBuilder::createStandardGraphSymbol(NormalizedSymbol &NSym,
575 Block &
B,
size_t Size,
581 dbgs() <<
" " <<
formatv(
"{0:x16}", NSym.Value) <<
" -- "
584 dbgs() <<
"<anonymous symbol>";
590 dbgs() <<
" [no-dead-strip]";
592 dbgs() <<
" [non-canonical]";
596 auto SymOffset = orc::ExecutorAddr(NSym.Value) -
B.getAddress();
599 ? G->addDefinedSymbol(
B, SymOffset, *NSym.Name,
Size, NSym.L, NSym.S,
600 IsText, IsNoDeadStrip)
601 : G->addAnonymousSymbol(
B, SymOffset,
Size, IsText, IsNoDeadStrip);
602 NSym.GraphSymbol = &Sym;
610Error MachOLinkGraphBuilder::graphifySectionsWithCustomParsers() {
612 for (
auto &KV : IndexToSection) {
613 auto &NSec = KV.second;
616 if (!NSec.GraphSection)
619 auto HI = CustomSectionParserFunctions.
find(NSec.GraphSection->getName());
620 if (HI != CustomSectionParserFunctions.
end()) {
621 auto &Parse =
HI->second;
622 if (
auto Err = Parse(NSec))
630Error MachOLinkGraphBuilder::graphifyCStringSection(
631 NormalizedSection &NSec, std::vector<NormalizedSymbol *> NSyms) {
632 assert(NSec.GraphSection &&
"C string literal section missing graph section");
633 assert(NSec.Data &&
"C string literal section has no data");
636 dbgs() <<
" Graphifying C-string literal section "
637 << NSec.GraphSection->getName() <<
"\n";
640 if (NSec.Data[NSec.Size - 1] !=
'\0')
641 return make_error<JITLinkError>(
"C string literal section " +
642 NSec.GraphSection->getName() +
643 " does not end with null terminator");
647 [](
const NormalizedSymbol *
LHS,
const NormalizedSymbol *
RHS) {
648 if (
LHS->Value !=
RHS->Value)
649 return LHS->Value >
RHS->Value;
657 return *LHS->Name > *RHS->Name;
667 for (
size_t I = 0;
I != NSec.Size; ++
I) {
668 if (NSec.Data[
I] ==
'\0') {
671 auto &
B = G->createContentBlock(*NSec.GraphSection,
672 {NSec.Data + BlockStart, BlockSize},
673 NSec.Address + BlockStart, NSec.Alignment,
674 BlockStart % NSec.Alignment);
677 dbgs() <<
" Created block " <<
B.getRange()
678 <<
", align = " <<
B.getAlignment()
679 <<
", align-ofs = " <<
B.getAlignmentOffset() <<
" for \"";
680 for (
size_t J = 0; J != std::min(
B.getSize(),
size_t(16)); ++J)
681 switch (
B.getContent()[J]) {
683 case '\n':
dbgs() <<
"\\n";
break;
684 case '\t':
dbgs() <<
"\\t";
break;
685 default:
dbgs() <<
B.getContent()[J];
break;
687 if (
B.getSize() > 16)
694 orc::ExecutorAddr(NSyms.back()->Value) !=
B.getAddress()) {
695 auto &S = G->addAnonymousSymbol(
B, 0,
BlockSize,
false,
false);
696 setCanonicalSymbol(NSec, S);
698 dbgs() <<
" Adding symbol for c-string block " <<
B.getRange()
699 <<
": <anonymous symbol> at offset 0\n";
704 auto LastCanonicalAddr =
B.getAddress() +
BlockSize;
705 while (!NSyms.empty() && orc::ExecutorAddr(NSyms.back()->Value) <
707 auto &NSym = *NSyms.back();
708 size_t SymSize = (
B.getAddress() +
BlockSize) -
709 orc::ExecutorAddr(NSyms.back()->Value);
713 bool IsCanonical =
false;
714 if (LastCanonicalAddr != orc::ExecutorAddr(NSym.Value)) {
716 LastCanonicalAddr = orc::ExecutorAddr(NSym.Value);
719 auto &Sym = createStandardGraphSymbol(NSym,
B, SymSize, SectionIsText,
720 SymLive, IsCanonical);
723 dbgs() <<
" Adding symbol for c-string block " <<
B.getRange()
725 << (Sym.hasName() ? Sym.getName() :
"<anonymous symbol>")
726 <<
" at offset " <<
formatv(
"{0:x}", Sym.getOffset()) <<
"\n";
737 [](Block *
B) { return isCStringBlock(*B); }) &&
738 "All blocks in section should hold single c-strings");
744 auto *CUSec =
G.findSectionByName(CompactUnwindSectionName);
748 if (!
G.getTargetTriple().isOSBinFormatMachO())
749 return make_error<JITLinkError>(
750 "Error linking " +
G.getName() +
751 ": compact unwind splitting not supported on non-macho target " +
752 G.getTargetTriple().str());
754 unsigned CURecordSize = 0;
755 unsigned PersonalityEdgeOffset = 0;
756 unsigned LSDAEdgeOffset = 0;
757 switch (
G.getTargetTriple().getArch()) {
767 PersonalityEdgeOffset = 16;
771 return make_error<JITLinkError>(
772 "Error linking " +
G.getName() +
773 ": compact unwind splitting not supported on " +
774 G.getTargetTriple().getArchName());
777 std::vector<Block *> OriginalBlocks(CUSec->blocks().begin(),
778 CUSec->blocks().end());
780 dbgs() <<
"In " <<
G.getName() <<
" splitting compact unwind section "
781 << CompactUnwindSectionName <<
" containing "
782 << OriginalBlocks.
size() <<
" initial blocks...\n";
785 while (!OriginalBlocks.empty()) {
786 auto *
B = OriginalBlocks.back();
787 OriginalBlocks.pop_back();
789 if (
B->getSize() == 0) {
791 dbgs() <<
" Skipping empty block at "
792 <<
formatv(
"{0:x16}",
B->getAddress()) <<
"\n";
798 dbgs() <<
" Splitting block at " <<
formatv(
"{0:x16}",
B->getAddress())
799 <<
" into " << (
B->getSize() / CURecordSize)
800 <<
" compact unwind record(s)\n";
803 if (
B->getSize() % CURecordSize)
804 return make_error<JITLinkError>(
805 "Error splitting compact unwind record in " +
G.getName() +
806 ": block at " +
formatv(
"{0:x}",
B->getAddress()) +
" has size " +
808 " (not a multiple of CU record size of " +
809 formatv(
"{0:x}", CURecordSize) +
")");
811 unsigned NumBlocks =
B->getSize() / CURecordSize;
814 for (
unsigned I = 0;
I != NumBlocks; ++
I) {
815 auto &CURec =
G.splitBlock(*
B, CURecordSize, &
C);
816 bool AddedKeepAlive =
false;
818 for (
auto &
E : CURec.edges()) {
819 if (
E.getOffset() == 0) {
821 dbgs() <<
" Updating compact unwind record at "
822 <<
formatv(
"{0:x16}", CURec.getAddress()) <<
" to point to "
823 << (
E.getTarget().hasName() ?
E.getTarget().getName()
825 <<
" (at " <<
formatv(
"{0:x16}",
E.getTarget().getAddress())
829 if (
E.getTarget().isExternal())
830 return make_error<JITLinkError>(
831 "Error adding keep-alive edge for compact unwind record at " +
832 formatv(
"{0:x}", CURec.getAddress()) +
": target " +
833 E.getTarget().getName() +
" is an external symbol");
834 auto &TgtBlock =
E.getTarget().getBlock();
836 G.addAnonymousSymbol(CURec, 0, CURecordSize,
false,
false);
838 AddedKeepAlive =
true;
839 }
else if (
E.getOffset() != PersonalityEdgeOffset &&
840 E.getOffset() != LSDAEdgeOffset)
841 return make_error<JITLinkError>(
"Unexpected edge at offset " +
843 " in compact unwind record at " +
844 formatv(
"{0:x}", CURec.getAddress()));
848 return make_error<JITLinkError>(
849 "Error adding keep-alive edge for compact unwind record at " +
850 formatv(
"{0:x}", CURec.getAddress()) +
851 ": 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 uint64_t 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.
const char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
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.
NormalizedSymbol & createNormalizedSymbol(ArgTs &&... Args)
Create a symbol.
static Linkage getLinkage(uint16_t Desc)
MachOLinkGraphBuilder(const object::MachOObjectFile &Obj, Triple TT, LinkGraph::GetEdgeKindNameFunction GetEdgeKindName)
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.
This is an optimization pass for GlobalISel generic memory operations.
auto formatv(const char *Fmt, Ts &&... Vals) -> formatv_object< decltype(std::make_tuple(detail::build_format_adapter(std::forward< Ts >(Vals))...))>
bool all_of(R &&range, UnaryPredicate P)
Provide wrappers to std::all_of which take ranges instead of having to pass begin/end explicitly.
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.