LLVM 17.0.0git
MCObjectFileInfo.cpp
Go to the documentation of this file.
1//===-- MCObjectFileInfo.cpp - Object File Information --------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
14#include "llvm/MC/MCAsmInfo.h"
15#include "llvm/MC/MCContext.h"
16#include "llvm/MC/MCSection.h"
27
28using namespace llvm;
29
30static bool useCompactUnwind(const Triple &T) {
31 // Only on darwin.
32 if (!T.isOSDarwin())
33 return false;
34
35 // aarch64 always has it.
36 if (T.getArch() == Triple::aarch64 || T.getArch() == Triple::aarch64_32)
37 return true;
38
39 // armv7k always has it.
40 if (T.isWatchABI())
41 return true;
42
43 // Use it on newer version of OS X.
44 if (T.isMacOSX() && !T.isMacOSXVersionLT(10, 6))
45 return true;
46
47 // And the iOS simulator.
48 if (T.isiOS() && T.isX86())
49 return true;
50
51 return false;
52}
53
54void MCObjectFileInfo::initMachOMCObjectFileInfo(const Triple &T) {
55 // MachO
57
59 "__TEXT", "__eh_frame",
63
64 if (T.isOSDarwin() &&
65 (T.getArch() == Triple::aarch64 || T.getArch() == Triple::aarch64_32))
67
68 switch (Ctx->emitDwarfUnwindInfo()) {
71 break;
74 break;
78 break;
79 }
80
82
83 TextSection // .text
84 = Ctx->getMachOSection("__TEXT", "__text",
87 DataSection // .data
88 = Ctx->getMachOSection("__DATA", "__data", 0, SectionKind::getData());
89
90 // BSSSection might not be expected initialized on msvc.
91 BSSSection = nullptr;
92
93 TLSDataSection // .tdata
94 = Ctx->getMachOSection("__DATA", "__thread_data",
97 TLSBSSSection // .tbss
98 = Ctx->getMachOSection("__DATA", "__thread_bss",
101
102 // TODO: Verify datarel below.
103 TLSTLVSection // .tlv
104 = Ctx->getMachOSection("__DATA", "__thread_vars",
107
109 "__DATA", "__thread_init", MachO::S_THREAD_LOCAL_INIT_FUNCTION_POINTERS,
111
112 CStringSection // .cstring
113 = Ctx->getMachOSection("__TEXT", "__cstring",
117 = Ctx->getMachOSection("__TEXT","__ustring", 0,
119 FourByteConstantSection // .literal4
120 = Ctx->getMachOSection("__TEXT", "__literal4",
123 EightByteConstantSection // .literal8
124 = Ctx->getMachOSection("__TEXT", "__literal8",
127
128 SixteenByteConstantSection // .literal16
129 = Ctx->getMachOSection("__TEXT", "__literal16",
132
133 ReadOnlySection // .const
134 = Ctx->getMachOSection("__TEXT", "__const", 0,
136
137 // If the target is not powerpc, map the coal sections to the non-coal
138 // sections.
139 //
140 // "__TEXT/__textcoal_nt" => section "__TEXT/__text"
141 // "__TEXT/__const_coal" => section "__TEXT/__const"
142 // "__DATA/__datacoal_nt" => section "__DATA/__data"
143 Triple::ArchType ArchTy = T.getArch();
144
145 ConstDataSection // .const_data
146 = Ctx->getMachOSection("__DATA", "__const", 0,
148
149 if (ArchTy == Triple::ppc || ArchTy == Triple::ppc64) {
151 = Ctx->getMachOSection("__TEXT", "__textcoal_nt",
156 = Ctx->getMachOSection("__TEXT", "__const_coal",
160 "__DATA", "__datacoal_nt", MachO::S_COALESCED, SectionKind::getData());
162 } else {
167 }
168
170 = Ctx->getMachOSection("__DATA","__common",
174 = Ctx->getMachOSection("__DATA","__bss", MachO::S_ZEROFILL,
176
177
179 = Ctx->getMachOSection("__DATA", "__la_symbol_ptr",
183 = Ctx->getMachOSection("__DATA", "__nl_symbol_ptr",
186
188 = Ctx->getMachOSection("__DATA", "__thread_ptr",
191
192 AddrSigSection = Ctx->getMachOSection("__DATA", "__llvm_addrsig", 0,
194
195 // Exception Handling.
196 LSDASection = Ctx->getMachOSection("__TEXT", "__gcc_except_tab", 0,
198
199 COFFDebugSymbolsSection = nullptr;
200 COFFDebugTypesSection = nullptr;
202
203 if (useCompactUnwind(T)) {
205 Ctx->getMachOSection("__LD", "__compact_unwind", MachO::S_ATTR_DEBUG,
207
208 if (T.isX86())
209 CompactUnwindDwarfEHFrameOnly = 0x04000000; // UNWIND_X86_64_MODE_DWARF
210 else if (T.getArch() == Triple::aarch64 || T.getArch() == Triple::aarch64_32)
211 CompactUnwindDwarfEHFrameOnly = 0x03000000; // UNWIND_ARM64_MODE_DWARF
212 else if (T.getArch() == Triple::arm || T.getArch() == Triple::thumb)
213 CompactUnwindDwarfEHFrameOnly = 0x04000000; // UNWIND_ARM_MODE_DWARF
214 }
215
216 // Debug Information.
218 Ctx->getMachOSection("__DWARF", "__debug_names", MachO::S_ATTR_DEBUG,
219 SectionKind::getMetadata(), "debug_names_begin");
221 Ctx->getMachOSection("__DWARF", "__apple_names", MachO::S_ATTR_DEBUG,
222 SectionKind::getMetadata(), "names_begin");
224 Ctx->getMachOSection("__DWARF", "__apple_objc", MachO::S_ATTR_DEBUG,
225 SectionKind::getMetadata(), "objc_begin");
226 // 16 character section limit...
228 Ctx->getMachOSection("__DWARF", "__apple_namespac", MachO::S_ATTR_DEBUG,
229 SectionKind::getMetadata(), "namespac_begin");
231 Ctx->getMachOSection("__DWARF", "__apple_types", MachO::S_ATTR_DEBUG,
232 SectionKind::getMetadata(), "types_begin");
233
235 Ctx->getMachOSection("__DWARF", "__swift_ast", MachO::S_ATTR_DEBUG,
237
239 Ctx->getMachOSection("__DWARF", "__debug_abbrev", MachO::S_ATTR_DEBUG,
240 SectionKind::getMetadata(), "section_abbrev");
242 Ctx->getMachOSection("__DWARF", "__debug_info", MachO::S_ATTR_DEBUG,
243 SectionKind::getMetadata(), "section_info");
245 Ctx->getMachOSection("__DWARF", "__debug_line", MachO::S_ATTR_DEBUG,
246 SectionKind::getMetadata(), "section_line");
248 Ctx->getMachOSection("__DWARF", "__debug_line_str", MachO::S_ATTR_DEBUG,
249 SectionKind::getMetadata(), "section_line_str");
251 Ctx->getMachOSection("__DWARF", "__debug_frame", MachO::S_ATTR_DEBUG,
254 Ctx->getMachOSection("__DWARF", "__debug_pubnames", MachO::S_ATTR_DEBUG,
257 Ctx->getMachOSection("__DWARF", "__debug_pubtypes", MachO::S_ATTR_DEBUG,
260 Ctx->getMachOSection("__DWARF", "__debug_gnu_pubn", MachO::S_ATTR_DEBUG,
263 Ctx->getMachOSection("__DWARF", "__debug_gnu_pubt", MachO::S_ATTR_DEBUG,
266 Ctx->getMachOSection("__DWARF", "__debug_str", MachO::S_ATTR_DEBUG,
267 SectionKind::getMetadata(), "info_string");
269 Ctx->getMachOSection("__DWARF", "__debug_str_offs", MachO::S_ATTR_DEBUG,
270 SectionKind::getMetadata(), "section_str_off");
272 Ctx->getMachOSection("__DWARF", "__debug_addr", MachO::S_ATTR_DEBUG,
273 SectionKind::getMetadata(), "section_info");
275 Ctx->getMachOSection("__DWARF", "__debug_loc", MachO::S_ATTR_DEBUG,
276 SectionKind::getMetadata(), "section_debug_loc");
278 Ctx->getMachOSection("__DWARF", "__debug_loclists", MachO::S_ATTR_DEBUG,
279 SectionKind::getMetadata(), "section_debug_loc");
280
282 Ctx->getMachOSection("__DWARF", "__debug_aranges", MachO::S_ATTR_DEBUG,
285 Ctx->getMachOSection("__DWARF", "__debug_ranges", MachO::S_ATTR_DEBUG,
286 SectionKind::getMetadata(), "debug_range");
288 Ctx->getMachOSection("__DWARF", "__debug_rnglists", MachO::S_ATTR_DEBUG,
289 SectionKind::getMetadata(), "debug_range");
291 Ctx->getMachOSection("__DWARF", "__debug_macinfo", MachO::S_ATTR_DEBUG,
292 SectionKind::getMetadata(), "debug_macinfo");
294 Ctx->getMachOSection("__DWARF", "__debug_macro", MachO::S_ATTR_DEBUG,
295 SectionKind::getMetadata(), "debug_macro");
297 Ctx->getMachOSection("__DWARF", "__debug_inlined", MachO::S_ATTR_DEBUG,
300 Ctx->getMachOSection("__DWARF", "__debug_cu_index", MachO::S_ATTR_DEBUG,
303 Ctx->getMachOSection("__DWARF", "__debug_tu_index", MachO::S_ATTR_DEBUG,
305 StackMapSection = Ctx->getMachOSection("__LLVM_STACKMAPS", "__llvm_stackmaps",
307
308 FaultMapSection = Ctx->getMachOSection("__LLVM_FAULTMAPS", "__llvm_faultmaps",
310
312 "__LLVM", "__remarks", MachO::S_ATTR_DEBUG, SectionKind::getMetadata());
313
314 // The architecture of dsymutil makes it very difficult to copy the Swift
315 // reflection metadata sections into the __TEXT segment, so dsymutil creates
316 // these sections in the __DWARF segment instead.
318#define HANDLE_SWIFT_SECTION(KIND, MACHO, ELF, COFF) \
319 Swift5ReflectionSections \
320 [llvm::binaryformat::Swift5ReflectionSectionKind::KIND] = \
321 Ctx->getMachOSection(Ctx->getSwift5ReflectionSegmentName().data(), \
322 MACHO, 0, SectionKind::getMetadata());
323#include "llvm/BinaryFormat/Swift.def"
324 }
325
327}
328
329void MCObjectFileInfo::initELFMCObjectFileInfo(const Triple &T, bool Large) {
330 switch (T.getArch()) {
331 case Triple::mips:
332 case Triple::mipsel:
333 case Triple::mips64:
334 case Triple::mips64el:
335 // We cannot use DW_EH_PE_sdata8 for the large PositionIndependent case
336 // since there is no R_MIPS_PC64 relocation (only a 32-bit version).
337 if (PositionIndependent && !Large)
339 else
343 break;
344 case Triple::ppc64:
345 case Triple::ppc64le:
346 case Triple::aarch64:
348 case Triple::x86_64:
351 break;
352 case Triple::bpfel:
353 case Triple::bpfeb:
355 break;
356 case Triple::hexagon:
358 PositionIndependent ? dwarf::DW_EH_PE_pcrel : dwarf::DW_EH_PE_absptr;
359 break;
360 case Triple::xtensa:
362 break;
363 default:
365 break;
366 }
367
368 unsigned EHSectionType = T.getArch() == Triple::x86_64
371
372 // Solaris requires different flags for .eh_frame to seemingly every other
373 // platform.
374 unsigned EHSectionFlags = ELF::SHF_ALLOC;
375 if (T.isOSSolaris() && T.getArch() != Triple::x86_64)
376 EHSectionFlags |= ELF::SHF_WRITE;
377
378 // ELF
381
384
387
390
392 Ctx->getELFSection(".tdata", ELF::SHT_PROGBITS,
394
397
398 DataRelROSection = Ctx->getELFSection(".data.rel.ro", ELF::SHT_PROGBITS,
400
402 Ctx->getELFSection(".rodata.cst4", ELF::SHT_PROGBITS,
404
406 Ctx->getELFSection(".rodata.cst8", ELF::SHT_PROGBITS,
408
410 Ctx->getELFSection(".rodata.cst16", ELF::SHT_PROGBITS,
412
414 Ctx->getELFSection(".rodata.cst32", ELF::SHT_PROGBITS,
416
417 // Exception Handling Sections.
418
419 // FIXME: We're emitting LSDA info into a readonly section on ELF, even though
420 // it contains relocatable pointers. In PIC mode, this is probably a big
421 // runtime hit for C++ apps. Either the contents of the LSDA need to be
422 // adjusted or this should be a data section.
423 LSDASection = Ctx->getELFSection(".gcc_except_table", ELF::SHT_PROGBITS,
425
426 COFFDebugSymbolsSection = nullptr;
427 COFFDebugTypesSection = nullptr;
428
429 unsigned DebugSecType = ELF::SHT_PROGBITS;
430
431 // MIPS .debug_* sections should have SHT_MIPS_DWARF section type
432 // to distinguish among sections contain DWARF and ECOFF debug formats.
433 // Sections with ECOFF debug format are obsoleted and marked by SHT_PROGBITS.
434 if (T.isMIPS())
435 DebugSecType = ELF::SHT_MIPS_DWARF;
436
437 // Debug Info Sections.
439 Ctx->getELFSection(".debug_abbrev", DebugSecType, 0);
440 DwarfInfoSection = Ctx->getELFSection(".debug_info", DebugSecType, 0);
441 DwarfLineSection = Ctx->getELFSection(".debug_line", DebugSecType, 0);
443 Ctx->getELFSection(".debug_line_str", DebugSecType,
445 DwarfFrameSection = Ctx->getELFSection(".debug_frame", DebugSecType, 0);
447 Ctx->getELFSection(".debug_pubnames", DebugSecType, 0);
449 Ctx->getELFSection(".debug_pubtypes", DebugSecType, 0);
451 Ctx->getELFSection(".debug_gnu_pubnames", DebugSecType, 0);
453 Ctx->getELFSection(".debug_gnu_pubtypes", DebugSecType, 0);
455 Ctx->getELFSection(".debug_str", DebugSecType,
457 DwarfLocSection = Ctx->getELFSection(".debug_loc", DebugSecType, 0);
459 Ctx->getELFSection(".debug_aranges", DebugSecType, 0);
461 Ctx->getELFSection(".debug_ranges", DebugSecType, 0);
463 Ctx->getELFSection(".debug_macinfo", DebugSecType, 0);
464 DwarfMacroSection = Ctx->getELFSection(".debug_macro", DebugSecType, 0);
465
466 // DWARF5 Experimental Debug Info
467
468 // Accelerator Tables
470 Ctx->getELFSection(".debug_names", ELF::SHT_PROGBITS, 0);
472 Ctx->getELFSection(".apple_names", ELF::SHT_PROGBITS, 0);
474 Ctx->getELFSection(".apple_objc", ELF::SHT_PROGBITS, 0);
476 Ctx->getELFSection(".apple_namespaces", ELF::SHT_PROGBITS, 0);
478 Ctx->getELFSection(".apple_types", ELF::SHT_PROGBITS, 0);
479
480 // String Offset and Address Sections
482 Ctx->getELFSection(".debug_str_offsets", DebugSecType, 0);
483 DwarfAddrSection = Ctx->getELFSection(".debug_addr", DebugSecType, 0);
484 DwarfRnglistsSection = Ctx->getELFSection(".debug_rnglists", DebugSecType, 0);
485 DwarfLoclistsSection = Ctx->getELFSection(".debug_loclists", DebugSecType, 0);
486
487 // Fission Sections
489 Ctx->getELFSection(".debug_info.dwo", DebugSecType, ELF::SHF_EXCLUDE);
491 Ctx->getELFSection(".debug_types.dwo", DebugSecType, ELF::SHF_EXCLUDE);
493 Ctx->getELFSection(".debug_abbrev.dwo", DebugSecType, ELF::SHF_EXCLUDE);
495 ".debug_str.dwo", DebugSecType,
498 Ctx->getELFSection(".debug_line.dwo", DebugSecType, ELF::SHF_EXCLUDE);
500 Ctx->getELFSection(".debug_loc.dwo", DebugSecType, ELF::SHF_EXCLUDE);
501 DwarfStrOffDWOSection = Ctx->getELFSection(".debug_str_offsets.dwo",
502 DebugSecType, ELF::SHF_EXCLUDE);
504 Ctx->getELFSection(".debug_rnglists.dwo", DebugSecType, ELF::SHF_EXCLUDE);
506 Ctx->getELFSection(".debug_macinfo.dwo", DebugSecType, ELF::SHF_EXCLUDE);
508 Ctx->getELFSection(".debug_macro.dwo", DebugSecType, ELF::SHF_EXCLUDE);
509
511 Ctx->getELFSection(".debug_loclists.dwo", DebugSecType, ELF::SHF_EXCLUDE);
512
513 // DWP Sections
515 Ctx->getELFSection(".debug_cu_index", DebugSecType, 0);
517 Ctx->getELFSection(".debug_tu_index", DebugSecType, 0);
518
520 Ctx->getELFSection(".llvm_stackmaps", ELF::SHT_PROGBITS, ELF::SHF_ALLOC);
521
523 Ctx->getELFSection(".llvm_faultmaps", ELF::SHT_PROGBITS, ELF::SHF_ALLOC);
524
526 Ctx->getELFSection(".eh_frame", EHSectionType, EHSectionFlags);
527
528 StackSizesSection = Ctx->getELFSection(".stack_sizes", ELF::SHT_PROGBITS, 0);
529
530 PseudoProbeSection = Ctx->getELFSection(".pseudo_probe", DebugSecType, 0);
532 Ctx->getELFSection(".pseudo_probe_desc", DebugSecType, 0);
533
534 LLVMStatsSection = Ctx->getELFSection(".llvm_stats", ELF::SHT_PROGBITS, 0);
535}
536
537void MCObjectFileInfo::initGOFFMCObjectFileInfo(const Triple &T) {
539 Ctx->getGOFFSection(".text", SectionKind::getText(), nullptr, nullptr);
540 BSSSection =
541 Ctx->getGOFFSection(".bss", SectionKind::getBSS(), nullptr, nullptr);
545}
546
547void MCObjectFileInfo::initCOFFMCObjectFileInfo(const Triple &T) {
552
553 // Set the `IMAGE_SCN_MEM_16BIT` flag when compiling for thumb mode. This is
554 // used to indicate to the linker that the text segment contains thumb instructions
555 // and to set the ISA selection bit for calls accordingly.
556 const bool IsThumb = T.getArch() == Triple::thumb;
557
558 // COFF
564 ".text",
576
577 if (T.getArch() == Triple::x86_64 || T.getArch() == Triple::aarch64 ||
578 T.getArch() == Triple::arm || T.getArch() == Triple::thumb) {
579 // On Windows with SEH, the LSDA is emitted into the .xdata section
580 LSDASection = nullptr;
581 } else {
582 LSDASection = Ctx->getCOFFSection(".gcc_except_table",
586 }
587
588 // Debug info.
600 ".debug$H",
604
606 ".debug_abbrev",
609 SectionKind::getMetadata(), "section_abbrev");
611 ".debug_info",
614 SectionKind::getMetadata(), "section_info");
616 ".debug_line",
619 SectionKind::getMetadata(), "section_line");
621 ".debug_line_str",
624 SectionKind::getMetadata(), "section_line_str");
626 ".debug_frame",
631 ".debug_pubnames",
636 ".debug_pubtypes",
641 ".debug_gnu_pubnames",
646 ".debug_gnu_pubtypes",
651 ".debug_str",
654 SectionKind::getMetadata(), "info_string");
656 ".debug_str_offsets",
659 SectionKind::getMetadata(), "section_str_off");
661 ".debug_loc",
664 SectionKind::getMetadata(), "section_debug_loc");
666 ".debug_loclists",
669 SectionKind::getMetadata(), "section_debug_loclists");
671 ".debug_aranges",
676 ".debug_ranges",
679 SectionKind::getMetadata(), "debug_range");
681 ".debug_rnglists",
684 SectionKind::getMetadata(), "debug_rnglists");
686 ".debug_macinfo",
689 SectionKind::getMetadata(), "debug_macinfo");
691 ".debug_macro",
694 SectionKind::getMetadata(), "debug_macro");
696 ".debug_macinfo.dwo",
699 SectionKind::getMetadata(), "debug_macinfo.dwo");
701 ".debug_macro.dwo",
704 SectionKind::getMetadata(), "debug_macro.dwo");
706 ".debug_info.dwo",
709 SectionKind::getMetadata(), "section_info_dwo");
711 ".debug_types.dwo",
714 SectionKind::getMetadata(), "section_types_dwo");
716 ".debug_abbrev.dwo",
719 SectionKind::getMetadata(), "section_abbrev_dwo");
721 ".debug_str.dwo",
724 SectionKind::getMetadata(), "skel_string");
726 ".debug_line.dwo",
731 ".debug_loc.dwo",
734 SectionKind::getMetadata(), "skel_loc");
736 ".debug_str_offsets.dwo",
739 SectionKind::getMetadata(), "section_str_off_dwo");
741 ".debug_addr",
744 SectionKind::getMetadata(), "addr_sec");
746 ".debug_cu_index",
751 ".debug_tu_index",
756 ".debug_names",
759 SectionKind::getMetadata(), "debug_names_begin");
761 ".apple_names",
764 SectionKind::getMetadata(), "names_begin");
766 ".apple_namespaces",
769 SectionKind::getMetadata(), "namespac_begin");
771 ".apple_types",
774 SectionKind::getMetadata(), "types_begin");
776 ".apple_objc",
779 SectionKind::getMetadata(), "objc_begin");
780
784
788
792
795
796 GEHContSection = Ctx->getCOFFSection(".gehcont$y",
800
801 GFIDsSection = Ctx->getCOFFSection(".gfids$y",
805
806 GIATsSection = Ctx->getCOFFSection(".giats$y",
810
811 GLJMPSection = Ctx->getCOFFSection(".gljmp$y",
815
820
821 StackMapSection = Ctx->getCOFFSection(".llvm_stackmaps",
825}
826
827void MCObjectFileInfo::initSPIRVMCObjectFileInfo(const Triple &T) {
828 // Put everything in a single binary section.
830}
831
832void MCObjectFileInfo::initWasmMCObjectFileInfo(const Triple &T) {
835
837 Ctx->getWasmSection(".debug_line", SectionKind::getMetadata());
839 Ctx->getWasmSection(".debug_line_str", SectionKind::getMetadata(),
844 Ctx->getWasmSection(".debug_loc", SectionKind::getMetadata());
846 Ctx->getWasmSection(".debug_abbrev", SectionKind::getMetadata());
849 Ctx->getWasmSection(".debug_ranges", SectionKind::getMetadata());
851 Ctx->getWasmSection(".debug_macinfo", SectionKind::getMetadata());
853 Ctx->getWasmSection(".debug_macro", SectionKind::getMetadata());
857 Ctx->getWasmSection(".debug_info", SectionKind::getMetadata());
862 Ctx->getWasmSection(".debug_gnu_pubnames", SectionKind::getMetadata());
864 Ctx->getWasmSection(".debug_gnu_pubtypes", SectionKind::getMetadata());
865
867 Ctx->getWasmSection(".debug_names", SectionKind::getMetadata());
869 Ctx->getWasmSection(".debug_str_offsets", SectionKind::getMetadata());
871 Ctx->getWasmSection(".debug_addr", SectionKind::getMetadata());
873 Ctx->getWasmSection(".debug_rnglists", SectionKind::getMetadata());
875 Ctx->getWasmSection(".debug_loclists", SectionKind::getMetadata());
876
877 // Fission Sections
879 Ctx->getWasmSection(".debug_info.dwo", SectionKind::getMetadata());
881 Ctx->getWasmSection(".debug_types.dwo", SectionKind::getMetadata());
883 Ctx->getWasmSection(".debug_abbrev.dwo", SectionKind::getMetadata());
885 Ctx->getWasmSection(".debug_str.dwo", SectionKind::getMetadata(),
888 Ctx->getWasmSection(".debug_line.dwo", SectionKind::getMetadata());
890 Ctx->getWasmSection(".debug_loc.dwo", SectionKind::getMetadata());
892 Ctx->getWasmSection(".debug_str_offsets.dwo", SectionKind::getMetadata());
894 Ctx->getWasmSection(".debug_rnglists.dwo", SectionKind::getMetadata());
896 Ctx->getWasmSection(".debug_macinfo.dwo", SectionKind::getMetadata());
898 Ctx->getWasmSection(".debug_macro.dwo", SectionKind::getMetadata());
899
901 Ctx->getWasmSection(".debug_loclists.dwo", SectionKind::getMetadata());
902
903 // DWP Sections
905 Ctx->getWasmSection(".debug_cu_index", SectionKind::getMetadata());
907 Ctx->getWasmSection(".debug_tu_index", SectionKind::getMetadata());
908
909 // Wasm use data section for LSDA.
910 // TODO Consider putting each function's exception table in a separate
911 // section, as in -function-sections, to facilitate lld's --gc-section.
912 LSDASection = Ctx->getWasmSection(".rodata.gcc_except_table",
914
915 // TODO: Define more sections.
916}
917
918void MCObjectFileInfo::initXCOFFMCObjectFileInfo(const Triple &T) {
919 // The default csect for program code. Functions without a specified section
920 // get placed into this csect. The choice of csect name is not a property of
921 // the ABI or object file format. For example, the XL compiler uses an unnamed
922 // csect for program code.
924 ".text", SectionKind::getText(),
926 /* MultiSymbolsAllowed*/ true);
927
929 ".data", SectionKind::getData(),
931 /* MultiSymbolsAllowed*/ true);
932
934 ".rodata", SectionKind::getReadOnly(),
936 /* MultiSymbolsAllowed*/ true);
938
940 ".rodata.8", SectionKind::getReadOnly(),
942 /* MultiSymbolsAllowed*/ true);
944
946 ".rodata.16", SectionKind::getReadOnly(),
948 /* MultiSymbolsAllowed*/ true);
950
952 ".tdata", SectionKind::getThreadData(),
954 /* MultiSymbolsAllowed*/ true);
955
957 "TOC", SectionKind::getData(),
960
961 // The TOC-base always has 0 size, but 4 byte alignment.
963
965 ".gcc_except_table", SectionKind::getReadOnly(),
968
970 ".eh_info_table", SectionKind::getData(),
973
974 // DWARF sections for XCOFF are not csects. They are special STYP_DWARF
975 // sections, and the individual DWARF sections are distinguished by their
976 // section subtype.
978 ".dwabrev", SectionKind::getMetadata(),
979 /* CsectProperties */ std::nullopt,
980 /* MultiSymbolsAllowed */ true, ".dwabrev", XCOFF::SSUBTYP_DWABREV);
981
983 ".dwinfo", SectionKind::getMetadata(), /* CsectProperties */ std::nullopt,
984 /* MultiSymbolsAllowed */ true, ".dwinfo", XCOFF::SSUBTYP_DWINFO);
985
987 ".dwline", SectionKind::getMetadata(), /* CsectProperties */ std::nullopt,
988 /* MultiSymbolsAllowed */ true, ".dwline", XCOFF::SSUBTYP_DWLINE);
989
991 ".dwframe", SectionKind::getMetadata(),
992 /* CsectProperties */ std::nullopt,
993 /* MultiSymbolsAllowed */ true, ".dwframe", XCOFF::SSUBTYP_DWFRAME);
994
996 ".dwpbnms", SectionKind::getMetadata(),
997 /* CsectProperties */ std::nullopt,
998 /* MultiSymbolsAllowed */ true, ".dwpbnms", XCOFF::SSUBTYP_DWPBNMS);
999
1001 ".dwpbtyp", SectionKind::getMetadata(),
1002 /* CsectProperties */ std::nullopt,
1003 /* MultiSymbolsAllowed */ true, ".dwpbtyp", XCOFF::SSUBTYP_DWPBTYP);
1004
1006 ".dwstr", SectionKind::getMetadata(), /* CsectProperties */ std::nullopt,
1007 /* MultiSymbolsAllowed */ true, ".dwstr", XCOFF::SSUBTYP_DWSTR);
1008
1010 ".dwloc", SectionKind::getMetadata(), /* CsectProperties */ std::nullopt,
1011 /* MultiSymbolsAllowed */ true, ".dwloc", XCOFF::SSUBTYP_DWLOC);
1012
1014 ".dwarnge", SectionKind::getMetadata(),
1015 /* CsectProperties */ std::nullopt,
1016 /* MultiSymbolsAllowed */ true, ".dwarnge", XCOFF::SSUBTYP_DWARNGE);
1017
1019 ".dwrnges", SectionKind::getMetadata(),
1020 /* CsectProperties */ std::nullopt,
1021 /* MultiSymbolsAllowed */ true, ".dwrnges", XCOFF::SSUBTYP_DWRNGES);
1022
1024 ".dwmac", SectionKind::getMetadata(), /* CsectProperties */ std::nullopt,
1025 /* MultiSymbolsAllowed */ true, ".dwmac", XCOFF::SSUBTYP_DWMAC);
1026}
1027
1028void MCObjectFileInfo::initDXContainerObjectFileInfo(const Triple &T) {
1029 // At the moment the DXBC section should end up empty.
1031}
1032
1034
1036 bool LargeCodeModel) {
1037 PositionIndependent = PIC;
1038 Ctx = &MCCtx;
1039
1040 // Common.
1044
1046
1048
1049 EHFrameSection = nullptr; // Created on demand.
1050 CompactUnwindSection = nullptr; // Used only by selected targets.
1051 DwarfAccelNamesSection = nullptr; // Used only by selected targets.
1052 DwarfAccelObjCSection = nullptr; // Used only by selected targets.
1053 DwarfAccelNamespaceSection = nullptr; // Used only by selected targets.
1054 DwarfAccelTypesSection = nullptr; // Used only by selected targets.
1055
1056 Triple TheTriple = Ctx->getTargetTriple();
1057 switch (Ctx->getObjectFileType()) {
1058 case MCContext::IsMachO:
1059 initMachOMCObjectFileInfo(TheTriple);
1060 break;
1061 case MCContext::IsCOFF:
1062 initCOFFMCObjectFileInfo(TheTriple);
1063 break;
1064 case MCContext::IsELF:
1065 initELFMCObjectFileInfo(TheTriple, LargeCodeModel);
1066 break;
1067 case MCContext::IsGOFF:
1068 initGOFFMCObjectFileInfo(TheTriple);
1069 break;
1070 case MCContext::IsSPIRV:
1071 initSPIRVMCObjectFileInfo(TheTriple);
1072 break;
1073 case MCContext::IsWasm:
1074 initWasmMCObjectFileInfo(TheTriple);
1075 break;
1076 case MCContext::IsXCOFF:
1077 initXCOFFMCObjectFileInfo(TheTriple);
1078 break;
1080 initDXContainerObjectFileInfo(TheTriple);
1081 break;
1082 }
1083}
1084
1085MCSection *MCObjectFileInfo::getDwarfComdatSection(const char *Name,
1086 uint64_t Hash) const {
1087 switch (Ctx->getTargetTriple().getObjectFormat()) {
1088 case Triple::ELF:
1090 utostr(Hash), /*IsComdat=*/true);
1091 case Triple::Wasm:
1093 utostr(Hash), MCContext::GenericSectionID);
1094 case Triple::MachO:
1095 case Triple::COFF:
1096 case Triple::GOFF:
1097 case Triple::SPIRV:
1098 case Triple::XCOFF:
1101 report_fatal_error("Cannot get DWARF comdat section for this object file "
1102 "format: not implemented.");
1103 break;
1104 }
1105 llvm_unreachable("Unknown ObjectFormatType");
1106}
1107
1108MCSection *
1110 if ((Ctx->getObjectFileType() != MCContext::IsELF) ||
1111 Ctx->getTargetTriple().isPS4())
1112 return StackSizesSection;
1113
1114 const MCSectionELF &ElfSec = static_cast<const MCSectionELF &>(TextSec);
1115 unsigned Flags = ELF::SHF_LINK_ORDER;
1116 StringRef GroupName;
1117 if (const MCSymbol *Group = ElfSec.getGroup()) {
1118 GroupName = Group->getName();
1120 }
1121
1122 return Ctx->getELFSection(".stack_sizes", ELF::SHT_PROGBITS, Flags, 0,
1123 GroupName, true, ElfSec.getUniqueID(),
1124 cast<MCSymbolELF>(TextSec.getBeginSymbol()));
1125}
1126
1127MCSection *
1129 if (Ctx->getObjectFileType() != MCContext::IsELF)
1130 return nullptr;
1131
1132 const MCSectionELF &ElfSec = static_cast<const MCSectionELF &>(TextSec);
1133 unsigned Flags = ELF::SHF_LINK_ORDER;
1134 StringRef GroupName;
1135 if (const MCSymbol *Group = ElfSec.getGroup()) {
1136 GroupName = Group->getName();
1138 }
1139
1140 // Use the text section's begin symbol and unique ID to create a separate
1141 // .llvm_bb_addr_map section associated with every unique text section.
1142 return Ctx->getELFSection(".llvm_bb_addr_map", ELF::SHT_LLVM_BB_ADDR_MAP,
1143 Flags, 0, GroupName, true, ElfSec.getUniqueID(),
1144 cast<MCSymbolELF>(TextSec.getBeginSymbol()));
1145}
1146
1147MCSection *
1149 if (Ctx->getObjectFileType() != MCContext::IsELF)
1150 return nullptr;
1151
1152 const MCSectionELF &ElfSec = static_cast<const MCSectionELF &>(TextSec);
1154 StringRef GroupName;
1155 if (const MCSymbol *Group = ElfSec.getGroup()) {
1156 GroupName = Group->getName();
1158 }
1159
1160 return Ctx->getELFSection(".kcfi_traps", ELF::SHT_PROGBITS, Flags, 0,
1161 GroupName,
1162 /*IsComdat=*/true, ElfSec.getUniqueID(),
1163 cast<MCSymbolELF>(TextSec.getBeginSymbol()));
1164}
1165
1166MCSection *
1168 if (Ctx->getObjectFileType() == MCContext::IsELF) {
1169 const auto &ElfSec = static_cast<const MCSectionELF &>(TextSec);
1170 // Create a separate section for probes that comes with a comdat function.
1171 if (const MCSymbol *Group = ElfSec.getGroup()) {
1172 auto *S = static_cast<MCSectionELF *>(PseudoProbeSection);
1173 auto Flags = S->getFlags() | ELF::SHF_GROUP;
1174 return Ctx->getELFSection(S->getName(), S->getType(), Flags,
1175 S->getEntrySize(), Group->getName(),
1176 /*IsComdat=*/true);
1177 }
1178 }
1179 return PseudoProbeSection;
1180}
1181
1182MCSection *
1184 if (Ctx->getObjectFileType() == MCContext::IsELF) {
1185 // Create a separate comdat group for each function's descriptor in order
1186 // for the linker to deduplicate. The duplication, must be from different
1187 // tranlation unit, can come from:
1188 // 1. Inline functions defined in header files;
1189 // 2. ThinLTO imported funcions;
1190 // 3. Weak-linkage definitions.
1191 // Use a concatenation of the section name and the function name as the
1192 // group name so that descriptor-only groups won't be folded with groups of
1193 // code.
1194 if (Ctx->getTargetTriple().supportsCOMDAT() && !FuncName.empty()) {
1195 auto *S = static_cast<MCSectionELF *>(PseudoProbeDescSection);
1196 auto Flags = S->getFlags() | ELF::SHF_GROUP;
1197 return Ctx->getELFSection(S->getName(), S->getType(), Flags,
1198 S->getEntrySize(),
1199 S->getName() + "_" + FuncName,
1200 /*IsComdat=*/true);
1201 }
1202 }
1204}
1205
1207 return LLVMStatsSection;
1208}
1209
1211 const MCSection *TextSec) const {
1212 if (Ctx->getObjectFileType() != MCContext::IsELF)
1213 return nullptr;
1214
1215 // SHF_WRITE for relocations, and let user post-process data in-place.
1217
1218 if (!TextSec)
1219 TextSec = getTextSection();
1220
1221 StringRef GroupName;
1222 const auto &ElfSec = static_cast<const MCSectionELF &>(*TextSec);
1223 if (const MCSymbol *Group = ElfSec.getGroup()) {
1224 GroupName = Group->getName();
1226 }
1227 return Ctx->getELFSection(Name, ELF::SHT_PROGBITS, Flags, 0, GroupName, true,
1228 ElfSec.getUniqueID(),
1229 cast<MCSymbolELF>(TextSec->getBeginSymbol()));
1230}
std::string Name
static bool useCompactUnwind(const Triple &T)
This file declares the MCSectionGOFF class, which contains all of the necessary machine code sections...
PassInstrumentationCallbacks PIC
This file contains some functions that are useful when dealing with strings.
@ Flags
Definition: TextStubV5.cpp:93
unsigned getCodePointerSize() const
Get the code pointer size in bytes.
Definition: MCAsmInfo.h:550
static const MCConstantExpr * create(int64_t Value, MCContext &Ctx, bool PrintInHex=false, unsigned SizeInBytes=0)
Definition: MCExpr.cpp:194
Context object for machine code objects.
Definition: MCContext.h:76
MCSectionMachO * getMachOSection(StringRef Segment, StringRef Section, unsigned TypeAndAttributes, unsigned Reserved2, SectionKind K, const char *BeginSymName=nullptr)
Return the MCSection for the specified mach-o section.
Definition: MCContext.cpp:435
Environment getObjectFileType() const
Definition: MCContext.h:429
MCSectionWasm * getWasmSection(const Twine &Section, SectionKind K, unsigned Flags=0)
Definition: MCContext.h:644
MCSectionELF * getELFSection(const Twine &Section, unsigned Type, unsigned Flags)
Definition: MCContext.h:563
const StringRef & getSwift5ReflectionSegmentName() const
Definition: MCContext.h:431
MCSectionXCOFF * getXCOFFSection(StringRef Section, SectionKind K, std::optional< XCOFF::CsectProperties > CsectProp=std::nullopt, bool MultiSymbolsAllowed=false, const char *BeginSymName=nullptr, std::optional< XCOFF::DwarfSectionSubtypeFlags > DwarfSubtypeFlags=std::nullopt)
Definition: MCContext.cpp:773
@ GenericSectionID
Pass this value as the UniqueID during section creation to get the generic section with the given nam...
Definition: MCContext.h:546
const MCAsmInfo * getAsmInfo() const
Definition: MCContext.h:446
MCSectionCOFF * getCOFFSection(StringRef Section, unsigned Characteristics, SectionKind Kind, StringRef COMDATSymName, int Selection, unsigned UniqueID=GenericSectionID, const char *BeginSymName=nullptr)
Definition: MCContext.cpp:660
MCSectionDXContainer * getDXContainerSection(StringRef Section, SectionKind K)
Get the section for the provided Section name.
Definition: MCContext.cpp:858
MCSectionSPIRV * getSPIRVSection()
Definition: MCContext.cpp:843
EmitDwarfUnwindType emitDwarfUnwindInfo() const
Definition: MCContext.cpp:925
MCSectionGOFF * getGOFFSection(StringRef Section, SectionKind Kind, MCSection *Parent, const MCExpr *SubsectionId)
Definition: MCContext.cpp:648
const Triple & getTargetTriple() const
Definition: MCContext.h:434
MCSection * NonLazySymbolPointerSection
MCSection * TLSBSSSection
Section directive for Thread Local uninitialized data.
MCSection * DwarfDebugNamesSection
Accelerator table sections.
const MCSection * TLSThreadInitSection
Section for thread local data initialization functions.
MCSection * DwarfStrOffSection
The DWARF v5 string offset and address table sections.
MCSection * DwarfARangesSection
MCSection * MergeableConst16Section
MCSection * COFFGlobalTypeHashesSection
MCSection * MergeableConst4Section
MCSection * DwarfMacinfoSection
MCSection * DwarfPubNamesSection
MCSection * DwarfGnuPubTypesSection
Section for newer gnu pubtypes.
MCSection * getLLVMStatsSection() const
MCSection * TextSection
Section directive for standard text.
MCSection * ConstDataCoalSection
MCSection * ConstTextCoalSection
MCSection * TLSDataSection
Section directive for Thread Local data. ELF, MachO, COFF, and Wasm.
MCSection * MergeableConst8Section
MCSection * ThreadLocalPointerSection
MCSection * LSDASection
If exception handling is supported by the target, this is the section the Language Specific Data Area...
MCSection * CompactUnwindSection
If exception handling is supported by the target and the target can support a compact representation ...
MCSection * COFFDebugSymbolsSection
MCSection * getPseudoProbeDescSection(StringRef FuncName) const
MCSection * DwarfLoclistsSection
The DWARF v5 locations list section.
MCSection * PseudoProbeSection
Section for pseudo probe information used by AutoFDO.
MCSection * FourByteConstantSection
MCSection * DwarfAccelNamesSection
MCSection * getStackSizesSection(const MCSection &TextSec) const
MCSection * DwarfRnglistsSection
The DWARF v5 range list section.
const MCSection * DwarfDebugInlineSection
MCSection * DwarfAbbrevDWOSection
MCSection * getBBAddrMapSection(const MCSection &TextSec) const
MCSection * COFFDebugTypesSection
MCSection * LazySymbolPointerSection
MCSection * RemarksSection
Remarks section.
MCSection * getPseudoProbeSection(const MCSection &TextSec) const
MCSection * PseudoProbeDescSection
MCSection * DwarfPubTypesSection
MCSection * DwarfRangesSection
MCSection * DwarfStrOffDWOSection
MCSection * TLSExtraDataSection
Extra TLS Variable Data section.
MCSection * EHFrameSection
EH frame section.
bool OmitDwarfIfHaveCompactUnwind
OmitDwarfIfHaveCompactUnwind - True if the target object file supports having some functions with com...
MCSection * DrectveSection
COFF specific sections.
MCSection * FaultMapSection
FaultMap section.
MCSection * getKCFITrapSection(const MCSection &TextSec) const
MCSection * DwarfAccelObjCSection
MCSection * TLSTLVSection
Section for thread local structure information.
MCSection * DwarfSwiftASTSection
void initMCObjectFileInfo(MCContext &MCCtx, bool PIC, bool LargeCodeModel=false)
MCSection * DwarfRnglistsDWOSection
The DWARF v5 range and location list sections for fission.
MCSection * MergeableConst32Section
MCSection * SixteenByteConstantSection
MCSection * getPCSection(StringRef Name, const MCSection *TextSec) const
MCSection * DwarfLineStrSection
bool SupportsCompactUnwindWithoutEHFrame
True if the target object file supports emitting a compact unwind section without an associated EH fr...
MCSection * ReadOnlySection
Section that is readonly and can contain arbitrary initialized data.
MCSection * DwarfAbbrevSection
unsigned FDECFIEncoding
FDE CFI encoding.
bool SupportsWeakOmittedEHFrame
True if target object file supports a weak_definition of constant 0 for an omitted EH frame.
MCSection * DwarfLoclistsDWOSection
MCSection * BSSSection
Section that is default initialized to zero.
MCSection * EightByteConstantSection
MCSection * StackSizesSection
Section containing metadata on function stack sizes.
unsigned CompactUnwindDwarfEHFrameOnly
Compact unwind encoding indicating that we should emit only an EH frame.
MCSection * getTextSection() const
MCSection * DwarfTypesDWOSection
MCSection * DwarfGnuPubNamesSection
Section for newer gnu pubnames.
MCSection * StackMapSection
StackMap section.
MCSection * DwarfMacroDWOSection
MCSection * DwarfMacinfoDWOSection
MCSection * DwarfAccelNamespaceSection
MCSection * DwarfAccelTypesSection
MCSection * DataSection
Section directive for standard data.
This represents a section on linux, lots of unix variants and some bare metal systems.
Definition: MCSectionELF.h:26
unsigned getUniqueID() const
Definition: MCSectionELF.h:87
const MCSymbolELF * getGroup() const
Definition: MCSectionELF.h:76
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Definition: MCSection.h:39
void setAlignment(Align Value)
Definition: MCSection.h:141
MCSymbol * getBeginSymbol()
Definition: MCSection.h:129
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
static SectionKind getThreadData()
Definition: SectionKind.h:207
static SectionKind getMetadata()
Definition: SectionKind.h:188
static SectionKind getMergeable2ByteCString()
Definition: SectionKind.h:196
static SectionKind getMergeableConst4()
Definition: SectionKind.h:202
static SectionKind getText()
Definition: SectionKind.h:190
static SectionKind getReadOnlyWithRel()
Definition: SectionKind.h:214
static SectionKind getData()
Definition: SectionKind.h:213
static SectionKind getMergeableConst8()
Definition: SectionKind.h:203
static SectionKind getBSS()
Definition: SectionKind.h:209
static SectionKind getThreadBSS()
Definition: SectionKind.h:206
static SectionKind getMergeableConst16()
Definition: SectionKind.h:204
static SectionKind getMergeable1ByteCString()
Definition: SectionKind.h:193
static SectionKind getReadOnly()
Definition: SectionKind.h:192
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
constexpr bool empty() const
empty - Check if the string is empty.
Definition: StringRef.h:134
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
bool isPS4() const
Tests whether the target is the PS4 platform.
Definition: Triple.h:708
ObjectFormatType getObjectFormat() const
Get the object format for this triple.
Definition: Triple.h:382
bool supportsCOMDAT() const
Tests whether the target supports comdat.
Definition: Triple.h:976
@ aarch64_be
Definition: Triple.h:52
@ mips64el
Definition: Triple.h:67
@ aarch64_32
Definition: Triple.h:53
@ DXContainer
Definition: Triple.h:284
@ UnknownObjectFormat
Definition: Triple.h:281
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
SectionCharacteristics
Definition: COFF.h:283
@ IMAGE_SCN_LNK_REMOVE
Definition: COFF.h:293
@ IMAGE_SCN_CNT_CODE
Definition: COFF.h:288
@ IMAGE_SCN_MEM_READ
Definition: COFF.h:321
@ IMAGE_SCN_MEM_EXECUTE
Definition: COFF.h:320
@ IMAGE_SCN_CNT_UNINITIALIZED_DATA
Definition: COFF.h:290
@ IMAGE_SCN_MEM_DISCARDABLE
Definition: COFF.h:316
@ IMAGE_SCN_LNK_INFO
Definition: COFF.h:292
@ IMAGE_SCN_MEM_16BIT
Definition: COFF.h:297
@ IMAGE_SCN_CNT_INITIALIZED_DATA
Definition: COFF.h:289
@ IMAGE_SCN_MEM_WRITE
Definition: COFF.h:322
@ SHF_MERGE
Definition: ELF.h:1089
@ SHF_STRINGS
Definition: ELF.h:1092
@ SHF_EXCLUDE
Definition: ELF.h:1117
@ SHF_ALLOC
Definition: ELF.h:1083
@ SHF_LINK_ORDER
Definition: ELF.h:1098
@ SHF_GROUP
Definition: ELF.h:1105
@ SHF_WRITE
Definition: ELF.h:1080
@ SHF_TLS
Definition: ELF.h:1108
@ SHF_EXECINSTR
Definition: ELF.h:1086
@ SHT_PROGBITS
Definition: ELF.h:995
@ SHT_NOBITS
Definition: ELF.h:1002
@ SHT_MIPS_DWARF
Definition: ELF.h:1063
@ SHT_LLVM_BB_ADDR_MAP
Definition: ELF.h:1032
@ SHT_X86_64_UNWIND
Definition: ELF.h:1059
@ SK_PPA1
Definition: GOFF.h:26
@ S_ATTR_DEBUG
S_ATTR_DEBUG - A debug section.
Definition: MachO.h:207
@ S_ATTR_NO_TOC
S_ATTR_NO_TOC - Section contains coalesced symbols that are not to be in a ranlib table of contents.
Definition: MachO.h:195
@ S_ATTR_LIVE_SUPPORT
S_ATTR_LIVE_SUPPORT - Blocks are live if they reference live blocks.
Definition: MachO.h:202
@ S_ATTR_PURE_INSTRUCTIONS
S_ATTR_PURE_INSTRUCTIONS - Section contains only true machine instructions.
Definition: MachO.h:192
@ S_ATTR_STRIP_STATIC_SYMS
S_ATTR_STRIP_STATIC_SYMS - Ok to strip static symbols in this section in files with the MY_DYLDLINK f...
Definition: MachO.h:198
@ S_THREAD_LOCAL_VARIABLE_POINTERS
S_THREAD_LOCAL_VARIABLE_POINTERS - Section with pointers to thread local structures.
Definition: MachO.h:175
@ S_16BYTE_LITERALS
S_16BYTE_LITERALS - Section with only 16 byte literals.
Definition: MachO.h:160
@ S_THREAD_LOCAL_INIT_FUNCTION_POINTERS
S_THREAD_LOCAL_INIT_FUNCTION_POINTERS - Section with thread local variable initialization pointers to...
Definition: MachO.h:178
@ S_COALESCED
S_COALESCED - Section contains symbols that are to be coalesced.
Definition: MachO.h:152
@ S_THREAD_LOCAL_ZEROFILL
S_THREAD_LOCAL_ZEROFILL - Thread local zerofill section.
Definition: MachO.h:169
@ S_LAZY_SYMBOL_POINTERS
S_LAZY_SYMBOL_POINTERS - Section with lazy symbol pointers.
Definition: MachO.h:141
@ S_CSTRING_LITERALS
S_CSTRING_LITERALS - Section with literal C strings.
Definition: MachO.h:131
@ S_THREAD_LOCAL_REGULAR
S_THREAD_LOCAL_REGULAR - Thread local data section.
Definition: MachO.h:167
@ S_ZEROFILL
S_ZEROFILL - Zero fill on demand section.
Definition: MachO.h:129
@ S_NON_LAZY_SYMBOL_POINTERS
S_NON_LAZY_SYMBOL_POINTERS - Section with non-lazy symbol pointers.
Definition: MachO.h:139
@ S_4BYTE_LITERALS
S_4BYTE_LITERALS - Section with 4 byte literals.
Definition: MachO.h:133
@ S_8BYTE_LITERALS
S_8BYTE_LITERALS - Section with 8 byte literals.
Definition: MachO.h:135
@ S_THREAD_LOCAL_VARIABLES
S_THREAD_LOCAL_VARIABLES - Section with thread local variable structure data.
Definition: MachO.h:172
@ SSUBTYP_DWARNGE
DWARF aranges section.
Definition: XCOFF.h:158
@ SSUBTYP_DWFRAME
DWARF frame section.
Definition: XCOFF.h:163
@ SSUBTYP_DWABREV
DWARF abbrev section.
Definition: XCOFF.h:159
@ SSUBTYP_DWINFO
DWARF info section.
Definition: XCOFF.h:154
@ SSUBTYP_DWRNGES
DWARF ranges section.
Definition: XCOFF.h:161
@ SSUBTYP_DWLOC
DWARF loc section.
Definition: XCOFF.h:162
@ SSUBTYP_DWMAC
DWARF macinfo section.
Definition: XCOFF.h:164
@ SSUBTYP_DWPBNMS
DWARF pubnames section.
Definition: XCOFF.h:156
@ SSUBTYP_DWPBTYP
DWARF pubtypes section.
Definition: XCOFF.h:157
@ SSUBTYP_DWLINE
DWARF line section.
Definition: XCOFF.h:155
@ SSUBTYP_DWSTR
DWARF str section.
Definition: XCOFF.h:160
@ XMC_TC0
TOC Anchor for TOC Addressability.
Definition: XCOFF.h:117
@ XMC_RW
Read Write Data.
Definition: XCOFF.h:116
@ XMC_TL
Initialized thread-local variable.
Definition: XCOFF.h:125
@ XMC_RO
Read Only Constant.
Definition: XCOFF.h:105
@ XMC_PR
Program Code.
Definition: XCOFF.h:104
@ XTY_SD
Csect definition for initialized storage.
Definition: XCOFF.h:241
@ DW_EH_PE_pcrel
Definition: Dwarf.h:526
@ DW_EH_PE_sdata4
Definition: Dwarf.h:523
@ DW_EH_PE_sdata8
Definition: Dwarf.h:524
@ DW_EH_PE_absptr
Definition: Dwarf.h:515
@ WASM_SEG_FLAG_STRINGS
Definition: Wasm.h:392
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
Definition: Error.cpp:145
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition: Alignment.h:39