18#define DEBUG_TYPE "jitlink"
31 return make_error<JITLinkError>(
"Object is not a relocatable MachO");
33 if (
auto Err = createNormalizedSections())
34 return std::move(Err);
36 if (
auto Err = createNormalizedSymbols())
37 return std::move(Err);
39 if (
auto Err = graphifyRegularSymbols())
40 return std::move(Err);
42 if (
auto Err = graphifySectionsWithCustomParsers())
43 return std::move(Err);
46 return std::move(Err);
53 std::shared_ptr<orc::SymbolStringPool> SSP,
Triple TT,
67 "Custom parser for this section already exists");
68 CustomSectionParserFunctions[
SectionName] = std::move(Parser);
93 strcmp(NSec.
SegName,
"__DWARF") == 0);
107Section &MachOLinkGraphBuilder::getCommonSection() {
111 return *CommonSection;
114Error MachOLinkGraphBuilder::createNormalizedSections() {
120 for (
auto &SecRef : Obj.
sections()) {
121 NormalizedSection NSec;
130 memcpy(&NSec.SectName, &Sec64.
sectname, 16);
131 NSec.SectName[16] =
'\0';
132 memcpy(&NSec.SegName, Sec64.
segname, 16);
133 NSec.SegName[16] =
'\0';
136 NSec.Size = Sec64.
size;
137 NSec.Alignment = 1ULL << Sec64.
align;
138 NSec.Flags = Sec64.
flags;
139 DataOffset = Sec64.
offset;
141 const MachO::section &Sec32 = Obj.
getSection(SecRef.getRawDataRefImpl());
143 memcpy(&NSec.SectName, &Sec32.sectname, 16);
144 NSec.SectName[16] =
'\0';
145 memcpy(&NSec.SegName, Sec32.segname, 16);
146 NSec.SegName[16] =
'\0';
148 NSec.Address = orc::ExecutorAddr(Sec32.addr);
149 NSec.Size = Sec32.size;
150 NSec.Alignment = 1ULL << Sec32.align;
151 NSec.Flags = Sec32.flags;
152 DataOffset = Sec32.offset;
156 dbgs() <<
" " << NSec.SegName <<
"," << NSec.SectName <<
": "
157 <<
formatv(
"{0:x16}", NSec.Address) <<
" -- "
158 <<
formatv(
"{0:x16}", NSec.Address + NSec.Size)
159 <<
", align: " << NSec.Alignment <<
", index: " << SecIndex
166 return make_error<JITLinkError>(
167 "Section data extends past end of file");
181 auto FullyQualifiedName =
182 G->allocateContent(StringRef(NSec.SegName) +
"," + NSec.SectName);
183 NSec.GraphSection = &G->createSection(
184 StringRef(FullyQualifiedName.data(), FullyQualifiedName.size()), Prot);
190 IndexToSection.insert(std::make_pair(SecIndex, std::move(NSec)));
193 std::vector<NormalizedSection *> Sections;
194 Sections.reserve(IndexToSection.size());
195 for (
auto &KV : IndexToSection)
196 Sections.push_back(&KV.second);
200 if (Sections.empty())
204 [](
const NormalizedSection *
LHS,
const NormalizedSection *
RHS) {
206 if (
LHS->Address !=
RHS->Address)
207 return LHS->Address <
RHS->Address;
208 return LHS->Size <
RHS->Size;
211 for (
unsigned I = 0,
E = Sections.size() - 1;
I !=
E; ++
I) {
212 auto &Cur = *Sections[
I];
213 auto &Next = *Sections[
I + 1];
214 if (Next.Address < Cur.Address + Cur.Size)
215 return make_error<JITLinkError>(
216 "Address range for section " +
217 formatv(
"\"{0}/{1}\" [ {2:x16} -- {3:x16} ] ", Cur.SegName,
218 Cur.SectName, Cur.Address, Cur.Address + Cur.Size) +
219 "overlaps section \"" + Next.SegName +
"/" + Next.SectName +
"\"" +
220 formatv(
"\"{0}/{1}\" [ {2:x16} -- {3:x16} ] ", Next.SegName,
221 Next.SectName, Next.Address, Next.Address + Next.Size));
227Error MachOLinkGraphBuilder::createNormalizedSymbols() {
230 for (
auto &SymRef : Obj.
symbols()) {
232 unsigned SymbolIndex = Obj.
getSymbolIndex(SymRef.getRawDataRefImpl());
240 const MachO::nlist_64 &NL64 =
242 Value = NL64.n_value;
248 const MachO::nlist &NL32 =
250 Value = NL32.n_value;
262 std::optional<StringRef>
Name;
264 if (
auto NameOrErr = SymRef.getName())
267 return NameOrErr.takeError();
269 return make_error<JITLinkError>(
"Symbol at index " +
271 " has no name (string table index 0), "
272 "but N_EXT bit is set");
277 dbgs() <<
"<anonymous symbol>";
280 dbgs() <<
": value = " <<
formatv(
"{0:x16}", Value)
281 <<
", type = " <<
formatv(
"{0:x2}", Type)
282 <<
", desc = " <<
formatv(
"{0:x4}",
Desc) <<
", sect = ";
284 dbgs() <<
static_cast<unsigned>(Sect - 1);
294 return NSec.takeError();
296 if (orc::ExecutorAddr(Value) < NSec->Address ||
297 orc::ExecutorAddr(Value) > NSec->Address + NSec->Size)
298 return make_error<JITLinkError>(
"Address " +
formatv(
"{0:x}", Value) +
299 " for symbol " + *
Name +
300 " does not fall within section");
302 if (!NSec->GraphSection) {
304 dbgs() <<
" Skipping: Symbol is in section " << NSec->SegName <<
"/"
306 <<
" which has no associated graph section.\n";
319void MachOLinkGraphBuilder::addSectionStartSymAndBlock(
320 unsigned SecIndex, Section &GraphSec, orc::ExecutorAddr
Address,
324 Data ? G->createContentBlock(GraphSec, ArrayRef<char>(
Data,
Size),
326 : G->createZeroFillBlock(GraphSec,
Size,
Address, Alignment, 0);
327 auto &
Sym = G->addAnonymousSymbol(
B, 0,
Size,
false, IsLive);
328 auto SecI = IndexToSection.find(SecIndex);
329 assert(SecI != IndexToSection.end() &&
"SecIndex invalid");
330 auto &NSec = SecI->second;
331 assert(!NSec.CanonicalSymbols.count(
Sym.getAddress()) &&
332 "Anonymous block start symbol clashes with existing symbol address");
333 NSec.CanonicalSymbols[
Sym.getAddress()] = &
Sym;
336Error MachOLinkGraphBuilder::graphifyRegularSymbols() {
341 std::vector<std::vector<NormalizedSymbol *>> SecIndexToSymbols;
342 SecIndexToSymbols.resize(256);
346 for (
auto &KV : IndexToSymbol) {
347 auto &NSym = *KV.second;
353 return make_error<JITLinkError>(
"Anonymous common symbol at index " +
355 NSym.GraphSymbol = &G->addDefinedSymbol(
356 G->createZeroFillBlock(getCommonSection(),
364 return make_error<JITLinkError>(
"Anonymous external symbol at "
367 NSym.GraphSymbol = &G->addExternalSymbol(
373 return make_error<JITLinkError>(
"Anonymous absolute symbol at index " +
375 NSym.GraphSymbol = &G->addAbsoluteSymbol(
380 SecIndexToSymbols[NSym.Sect - 1].push_back(&NSym);
383 return make_error<JITLinkError>(
384 "Unupported N_PBUD symbol " +
385 (NSym.Name ? (
"\"" + *NSym.Name +
"\"") : Twine(
"<anon>")) +
386 " at index " + Twine(KV.first));
388 return make_error<JITLinkError>(
389 "Unupported N_INDR symbol " +
390 (NSym.Name ? (
"\"" + *NSym.Name +
"\"") : Twine(
"<anon>")) +
391 " at index " + Twine(KV.first));
393 return make_error<JITLinkError>(
394 "Unrecognized symbol type " + Twine(NSym.Type &
MachO::N_TYPE) +
396 (NSym.Name ? (
"\"" + *NSym.Name +
"\"") : Twine(
"<anon>")) +
397 " at index " + Twine(KV.first));
403 for (
auto &KV : IndexToSection) {
404 auto SecIndex = KV.first;
405 auto &NSec = KV.second;
407 if (!NSec.GraphSection) {
409 dbgs() <<
" " << NSec.SegName <<
"/" << NSec.SectName
410 <<
" has no graph section. Skipping.\n";
416 if (CustomSectionParserFunctions.
count(NSec.GraphSection->getName())) {
418 dbgs() <<
" Skipping section " << NSec.GraphSection->getName()
419 <<
" as it has a custom parser.\n";
424 if (
auto Err = graphifyCStringSection(
425 NSec, std::move(SecIndexToSymbols[SecIndex])))
430 dbgs() <<
" Graphifying regular section "
431 << NSec.GraphSection->getName() <<
"...\n";
437 auto &SecNSymStack = SecIndexToSymbols[SecIndex];
441 if (SecNSymStack.empty()) {
444 dbgs() <<
" Section non-empty, but contains no symbols. "
445 "Creating anonymous block to cover "
446 <<
formatv(
"{0:x16}", NSec.Address) <<
" -- "
447 <<
formatv(
"{0:x16}", NSec.Address + NSec.Size) <<
"\n";
449 addSectionStartSymAndBlock(SecIndex, *NSec.GraphSection, NSec.Address,
450 NSec.Data, NSec.Size, NSec.Alignment,
451 SectionIsNoDeadStrip);
454 dbgs() <<
" Section empty and contains no symbols. Skipping.\n";
463 const NormalizedSymbol *
RHS) {
464 if (
LHS->Value !=
RHS->Value)
465 return LHS->Value >
RHS->Value;
470 return LHS->Name <
RHS->Name;
474 if (!SecNSymStack.empty() &&
isAltEntry(*SecNSymStack.back()))
475 return make_error<JITLinkError>(
476 "First symbol in " + NSec.GraphSection->getName() +
" is alt-entry");
480 if (orc::ExecutorAddr(SecNSymStack.back()->Value) != NSec.Address) {
482 orc::ExecutorAddr(SecNSymStack.back()->Value) - NSec.Address;
484 dbgs() <<
" Section start not covered by symbol. "
485 <<
"Creating anonymous block to cover [ " << NSec.Address
486 <<
" -- " << (NSec.Address + AnonBlockSize) <<
" ]\n";
488 addSectionStartSymAndBlock(SecIndex, *NSec.GraphSection, NSec.Address,
489 NSec.Data, AnonBlockSize, NSec.Alignment,
490 SectionIsNoDeadStrip);
501 while (!SecNSymStack.empty()) {
502 SmallVector<NormalizedSymbol *, 8> BlockSyms;
506 BlockSyms.push_back(SecNSymStack.back());
507 SecNSymStack.pop_back();
508 while (!SecNSymStack.empty() &&
510 SecNSymStack.back()->Value == BlockSyms.back()->Value ||
511 !SubsectionsViaSymbols)) {
512 BlockSyms.push_back(SecNSymStack.back());
513 SecNSymStack.pop_back();
517 auto BlockStart = orc::ExecutorAddr(BlockSyms.front()->Value);
518 orc::ExecutorAddr BlockEnd =
519 SecNSymStack.empty() ? NSec.Address + NSec.Size
520 : orc::ExecutorAddr(SecNSymStack.back()->Value);
525 dbgs() <<
" Creating block for " <<
formatv(
"{0:x16}", BlockStart)
526 <<
" -- " <<
formatv(
"{0:x16}", BlockEnd) <<
": "
527 << NSec.GraphSection->getName() <<
" + "
528 <<
formatv(
"{0:x16}", BlockOffset) <<
" with "
529 << BlockSyms.size() <<
" symbol(s)...\n";
534 ? G->createContentBlock(
536 ArrayRef<char>(NSec.Data + BlockOffset,
BlockSize),
537 BlockStart, NSec.Alignment, BlockStart % NSec.Alignment)
538 : G->createZeroFillBlock(*NSec.GraphSection,
BlockSize,
539 BlockStart, NSec.Alignment,
540 BlockStart % NSec.Alignment);
542 std::optional<orc::ExecutorAddr> LastCanonicalAddr;
543 auto SymEnd = BlockEnd;
544 while (!BlockSyms.empty()) {
545 auto &NSym = *BlockSyms.back();
546 BlockSyms.pop_back();
551 auto &
Sym = createStandardGraphSymbol(
552 NSym,
B, SymEnd - orc::ExecutorAddr(NSym.Value), SectionIsText,
553 SymLive, LastCanonicalAddr != orc::ExecutorAddr(NSym.Value));
555 if (LastCanonicalAddr !=
Sym.getAddress()) {
556 if (LastCanonicalAddr)
557 SymEnd = *LastCanonicalAddr;
558 LastCanonicalAddr =
Sym.getAddress();
567Symbol &MachOLinkGraphBuilder::createStandardGraphSymbol(NormalizedSymbol &NSym,
568 Block &
B,
size_t Size,
574 dbgs() <<
" " <<
formatv(
"{0:x16}", NSym.Value) <<
" -- "
577 dbgs() <<
"<anonymous symbol>";
579 dbgs() << *NSym.Name;
583 dbgs() <<
" [no-dead-strip]";
585 dbgs() <<
" [non-canonical]";
589 auto SymOffset = orc::ExecutorAddr(NSym.Value) -
B.getAddress();
592 ? G->addDefinedSymbol(
B, SymOffset, *NSym.Name,
Size, NSym.L, NSym.S,
593 IsText, IsNoDeadStrip)
594 : G->addAnonymousSymbol(
B, SymOffset,
Size, IsText, IsNoDeadStrip);
595 NSym.GraphSymbol = &
Sym;
603Error MachOLinkGraphBuilder::graphifySectionsWithCustomParsers() {
605 for (
auto &KV : IndexToSection) {
606 auto &NSec = KV.second;
609 if (!NSec.GraphSection)
612 auto HI = CustomSectionParserFunctions.
find(NSec.GraphSection->getName());
613 if (HI != CustomSectionParserFunctions.
end()) {
614 auto &Parse =
HI->second;
615 if (
auto Err = Parse(NSec))
623Error MachOLinkGraphBuilder::graphifyCStringSection(
624 NormalizedSection &NSec, std::vector<NormalizedSymbol *> NSyms) {
625 assert(NSec.GraphSection &&
"C string literal section missing graph section");
626 assert(NSec.Data &&
"C string literal section has no data");
629 dbgs() <<
" Graphifying C-string literal section "
630 << NSec.GraphSection->getName() <<
"\n";
633 if (NSec.Data[NSec.Size - 1] !=
'\0')
634 return make_error<JITLinkError>(
"C string literal section " +
635 NSec.GraphSection->getName() +
636 " does not end with null terminator");
640 [](
const NormalizedSymbol *
LHS,
const NormalizedSymbol *
RHS) {
641 if (
LHS->Value !=
RHS->Value)
642 return LHS->Value >
RHS->Value;
650 return *LHS->Name > *RHS->Name;
660 for (
size_t I = 0;
I != NSec.Size; ++
I) {
661 if (NSec.Data[
I] ==
'\0') {
664 auto &
B = G->createContentBlock(*NSec.GraphSection,
665 {NSec.Data + BlockStart, BlockSize},
666 NSec.Address + BlockStart, NSec.Alignment,
667 BlockStart % NSec.Alignment);
670 dbgs() <<
" Created block " <<
B.getRange()
671 <<
", align = " <<
B.getAlignment()
672 <<
", align-ofs = " <<
B.getAlignmentOffset() <<
" for \"";
673 for (
size_t J = 0; J != std::min(
B.getSize(),
size_t(16)); ++J)
674 switch (
B.getContent()[J]) {
676 case '\n':
dbgs() <<
"\\n";
break;
677 case '\t':
dbgs() <<
"\\t";
break;
678 default:
dbgs() <<
B.getContent()[J];
break;
680 if (
B.getSize() > 16)
687 orc::ExecutorAddr(NSyms.back()->Value) !=
B.getAddress()) {
688 auto &S = G->addAnonymousSymbol(
B, 0,
BlockSize,
false,
false);
689 setCanonicalSymbol(NSec, S);
691 dbgs() <<
" Adding symbol for c-string block " <<
B.getRange()
692 <<
": <anonymous symbol> at offset 0\n";
697 auto LastCanonicalAddr =
B.getAddress() +
BlockSize;
698 while (!NSyms.empty() && orc::ExecutorAddr(NSyms.back()->Value) <
700 auto &NSym = *NSyms.back();
701 size_t SymSize = (
B.getAddress() +
BlockSize) -
702 orc::ExecutorAddr(NSyms.back()->Value);
706 bool IsCanonical =
false;
707 if (LastCanonicalAddr != orc::ExecutorAddr(NSym.Value)) {
709 LastCanonicalAddr = orc::ExecutorAddr(NSym.Value);
712 auto &
Sym = createStandardGraphSymbol(NSym,
B, SymSize, SectionIsText,
713 SymLive, IsCanonical);
716 dbgs() <<
" Adding symbol for c-string block " <<
B.getRange()
718 << (
Sym.hasName() ? *
Sym.getName() :
"<anonymous symbol>")
719 <<
" at offset " <<
formatv(
"{0:x}",
Sym.getOffset()) <<
"\n";
730 [](Block *
B) { return isCStringBlock(*B); }) &&
731 "All blocks in section should hold single c-strings");
737 auto *CUSec =
G.findSectionByName(CompactUnwindSectionName);
741 if (!
G.getTargetTriple().isOSBinFormatMachO())
742 return make_error<JITLinkError>(
743 "Error linking " +
G.getName() +
744 ": compact unwind splitting not supported on non-macho target " +
745 G.getTargetTriple().str());
747 unsigned CURecordSize = 0;
748 unsigned PersonalityEdgeOffset = 0;
749 unsigned LSDAEdgeOffset = 0;
750 switch (
G.getTargetTriple().getArch()) {
760 PersonalityEdgeOffset = 16;
764 return make_error<JITLinkError>(
765 "Error linking " +
G.getName() +
766 ": compact unwind splitting not supported on " +
767 G.getTargetTriple().getArchName());
770 std::vector<Block *> OriginalBlocks(CUSec->blocks().begin(),
771 CUSec->blocks().end());
773 dbgs() <<
"In " <<
G.getName() <<
" splitting compact unwind section "
774 << CompactUnwindSectionName <<
" containing "
775 << OriginalBlocks.
size() <<
" initial blocks...\n";
778 while (!OriginalBlocks.empty()) {
779 auto *
B = OriginalBlocks.back();
780 OriginalBlocks.pop_back();
782 if (
B->getSize() == 0) {
784 dbgs() <<
" Skipping empty block at "
785 <<
formatv(
"{0:x16}",
B->getAddress()) <<
"\n";
790 unsigned NumBlocks =
B->getSize() / CURecordSize;
793 dbgs() <<
" Splitting block at " <<
formatv(
"{0:x16}",
B->getAddress())
794 <<
" into " << NumBlocks <<
" compact unwind record(s)\n";
797 if (
B->getSize() % CURecordSize)
798 return make_error<JITLinkError>(
799 "Error splitting compact unwind record in " +
G.getName() +
800 ": block at " +
formatv(
"{0:x}",
B->getAddress()) +
" has size " +
802 " (not a multiple of CU record size of " +
803 formatv(
"{0:x}", CURecordSize) +
")");
807 return Idx * CURecordSize;
810 for (
auto *CURec :
Blocks) {
811 bool AddedKeepAlive =
false;
813 for (
auto &
E : CURec->edges()) {
814 if (
E.getOffset() == 0) {
816 dbgs() <<
" Updating compact unwind record at "
817 << CURec->getAddress() <<
" to point to "
818 << (
E.getTarget().hasName() ? *
E.getTarget().getName()
820 <<
" (at " <<
E.getTarget().getAddress() <<
")\n";
823 if (
E.getTarget().isExternal())
824 return make_error<JITLinkError>(
825 "Error adding keep-alive edge for compact unwind record at " +
826 formatv(
"{0:x}", CURec->getAddress()) +
": target " +
827 *
E.getTarget().getName() +
" is an external symbol");
828 auto &TgtBlock =
E.getTarget().getBlock();
830 G.addAnonymousSymbol(*CURec, 0, CURecordSize,
false,
false);
832 AddedKeepAlive =
true;
833 }
else if (
E.getOffset() != PersonalityEdgeOffset &&
834 E.getOffset() != LSDAEdgeOffset)
835 return make_error<JITLinkError>(
836 "Unexpected edge at offset " +
formatv(
"{0:x}",
E.getOffset()) +
837 " in compact unwind record at " +
838 formatv(
"{0:x}", CURec->getAddress()));
842 return make_error<JITLinkError>(
843 "Error adding keep-alive edge for compact unwind record at " +
844 formatv(
"{0:x}", CURec->getAddress()) +
845 ": 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)
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
DenseMap< Block *, BlockRelaxAux > Blocks
static const char * CommonSectionName
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Provides some synthesis utilities to produce sequences of values.
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)
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, std::shared_ptr< orc::SymbolStringPool > SSP, 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.
Represents an object file section.
StringRef getData() 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
Represents an address in the executor process.
@ 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 map_range(ContainerTy &&C, FuncTy F)
auto formatv(bool Validate, const char *Fmt, 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.
auto seq(T Begin, T End)
Iterate over an integral type from Begin up to - but not including - End.
Implement std::hash so that hash_code can be used in STL containers.
Description of the encoding of one expression Op.