llvm.org GIT mirror llvm / 18a4c16
move dwarf debug info section selection stuff from TAI to TLOF, unifying all the dwarf targets at the same time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77889 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 10 years ago
12 changed file(s) with 174 addition(s) and 208 deletion(s). Raw diff Collapse all Expand all
314314 /// DwarfSectionOffsetDirective - Special section offset directive.
315315 const char* DwarfSectionOffsetDirective; // Defaults to NULL
316316
317 /// DwarfAbbrevSection - Section directive for Dwarf abbrev.
318 ///
319 const char *DwarfAbbrevSection; // Defaults to ".debug_abbrev".
320
321 /// DwarfInfoSection - Section directive for Dwarf info.
322 ///
323 const char *DwarfInfoSection; // Defaults to ".debug_info".
324
325 /// DwarfLineSection - Section directive for Dwarf info.
326 ///
327 const char *DwarfLineSection; // Defaults to ".debug_line".
328
329 /// DwarfFrameSection - Section directive for Dwarf info.
330 ///
331 const char *DwarfFrameSection; // Defaults to ".debug_frame".
332
333 /// DwarfPubNamesSection - Section directive for Dwarf info.
334 ///
335 const char *DwarfPubNamesSection; // Defaults to ".debug_pubnames".
336
337 /// DwarfPubTypesSection - Section directive for Dwarf info.
338 ///
339 const char *DwarfPubTypesSection; // Defaults to ".debug_pubtypes".
340
341 /// DwarfDebugInlineSection - Section directive for inline info.
342 ///
343 const char *DwarfDebugInlineSection; // Defaults to ".debug_inlined"
344
345 /// DwarfStrSection - Section directive for Dwarf info.
346 ///
347 const char *DwarfStrSection; // Defaults to ".debug_str".
348
349 /// DwarfLocSection - Section directive for Dwarf info.
350 ///
351 const char *DwarfLocSection; // Defaults to ".debug_loc".
352
353 /// DwarfARangesSection - Section directive for Dwarf info.
354 ///
355 const char *DwarfARangesSection; // Defaults to ".debug_aranges".
356
357 /// DwarfRangesSection - Section directive for Dwarf info.
358 ///
359 const char *DwarfRangesSection; // Defaults to ".debug_ranges".
360
361 /// DwarfMacroInfoSection - Section directive for DWARF macro info.
362 ///
363 const char *DwarfMacroInfoSection; // Defaults to ".debug_macinfo".
364
365 /// DwarfEHFrameSection - Section directive for Exception frames.
366 ///
367 const char *DwarfEHFrameSection; // Defaults to ".eh_frame".
368
369317 //===--- CBE Asm Translation Table -----------------------------------===//
370318
371319 const char *const *AsmTransCBE; // Defaults to empty
583531 const char *getDwarfSectionOffsetDirective() const {
584532 return DwarfSectionOffsetDirective;
585533 }
586 const char *getDwarfAbbrevSection() const {
587 return DwarfAbbrevSection;
588 }
589 const char *getDwarfInfoSection() const {
590 return DwarfInfoSection;
591 }
592 const char *getDwarfLineSection() const {
593 return DwarfLineSection;
594 }
595 const char *getDwarfFrameSection() const {
596 return DwarfFrameSection;
597 }
598 const char *getDwarfPubNamesSection() const {
599 return DwarfPubNamesSection;
600 }
601 const char *getDwarfPubTypesSection() const {
602 return DwarfPubTypesSection;
603 }
604 const char *getDwarfDebugInlineSection() const {
605 return DwarfDebugInlineSection;
606 }
607 const char *getDwarfStrSection() const {
608 return DwarfStrSection;
609 }
610 const char *getDwarfLocSection() const {
611 return DwarfLocSection;
612 }
613 const char *getDwarfARangesSection() const {
614 return DwarfARangesSection;
615 }
616 const char *getDwarfRangesSection() const {
617 return DwarfRangesSection;
618 }
619 const char *getDwarfMacroInfoSection() const {
620 return DwarfMacroInfoSection;
621 }
622 const char *getDwarfEHFrameSection() const {
623 return DwarfEHFrameSection;
624 }
625534 const char *const *getAsmCBE() const {
626535 return AsmTransCBE;
627536 }
6565 /// the section the EH Frame is emitted to.
6666 const MCSection *EHFrameSection;
6767
68 // Dwarf sections for debug info. If a target supports debug info, these must
69 // be set.
70 const MCSection *DwarfAbbrevSection;
71 const MCSection *DwarfInfoSection;
72 const MCSection *DwarfLineSection;
73 const MCSection *DwarfFrameSection;
74 const MCSection *DwarfPubNamesSection;
75 const MCSection *DwarfPubTypesSection;
76 const MCSection *DwarfDebugInlineSection;
77 const MCSection *DwarfStrSection;
78 const MCSection *DwarfLocSection;
79 const MCSection *DwarfARangesSection;
80 const MCSection *DwarfRangesSection;
81 const MCSection *DwarfMacroInfoSection;
6882
6983 public:
7084 // FIXME: NONPUB.
89103 const MCSection *getStaticDtorSection() const { return StaticDtorSection; }
90104 const MCSection *getLSDASection() const { return LSDASection; }
91105 const MCSection *getEHFrameSection() const { return EHFrameSection; }
92
106 const MCSection *getDwarfAbbrevSection() const { return DwarfAbbrevSection; }
107 const MCSection *getDwarfInfoSection() const { return DwarfInfoSection; }
108 const MCSection *getDwarfLineSection() const { return DwarfLineSection; }
109 const MCSection *getDwarfFrameSection() const { return DwarfFrameSection; }
110 const MCSection *getDwarfPubNamesSection() const{return DwarfPubNamesSection;}
111 const MCSection *getDwarfPubTypesSection() const{return DwarfPubTypesSection;}
112 const MCSection *getDwarfDebugInlineSection() const {
113 return DwarfDebugInlineSection;
114 }
115 const MCSection *getDwarfStrSection() const { return DwarfStrSection; }
116 const MCSection *getDwarfLocSection() const { return DwarfLocSection; }
117 const MCSection *getDwarfARangesSection() const { return DwarfARangesSection;}
118 const MCSection *getDwarfRangesSection() const { return DwarfRangesSection; }
119 const MCSection *getDwarfMacroInfoSection() const {
120 return DwarfMacroInfoSection;
121 }
122
93123 /// shouldEmitUsedDirectiveFor - This hook allows targets to selectively
94124 /// decide not to emit the UsedDirective for some symbols in llvm.used.
95125 /// FIXME: REMOVE this (rdar://7071300)
18651865
18661866 // Dwarf sections base addresses.
18671867 if (TAI->doesDwarfRequireFrameSection()) {
1868 Asm->SwitchToDataSection(TAI->getDwarfFrameSection());
1868 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfFrameSection());
18691869 EmitLabel("section_debug_frame", 0);
18701870 }
18711871
1872 Asm->SwitchToDataSection(TAI->getDwarfInfoSection());
1872 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfInfoSection());
18731873 EmitLabel("section_info", 0);
1874 Asm->SwitchToDataSection(TAI->getDwarfAbbrevSection());
1874 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfAbbrevSection());
18751875 EmitLabel("section_abbrev", 0);
1876 Asm->SwitchToDataSection(TAI->getDwarfARangesSection());
1876 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfARangesSection());
18771877 EmitLabel("section_aranges", 0);
18781878
1879 if (const char *LineInfoDirective = TAI->getDwarfMacroInfoSection()) {
1880 Asm->SwitchToDataSection(LineInfoDirective);
1879 if (const MCSection *LineInfoDirective =
1880 Asm->getObjFileLowering().getDwarfMacroInfoSection()) {
1881 Asm->SwitchToSection(LineInfoDirective);
18811882 EmitLabel("section_macinfo", 0);
18821883 }
18831884
1884 Asm->SwitchToDataSection(TAI->getDwarfLineSection());
1885 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfLineSection());
18851886 EmitLabel("section_line", 0);
1886 Asm->SwitchToDataSection(TAI->getDwarfLocSection());
1887 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfLocSection());
18871888 EmitLabel("section_loc", 0);
1888 Asm->SwitchToDataSection(TAI->getDwarfPubNamesSection());
1889 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfPubNamesSection());
18891890 EmitLabel("section_pubnames", 0);
1890 Asm->SwitchToDataSection(TAI->getDwarfStrSection());
1891 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfStrSection());
18911892 EmitLabel("section_str", 0);
1892 Asm->SwitchToDataSection(TAI->getDwarfRangesSection());
1893 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfRangesSection());
18931894 EmitLabel("section_ranges", 0);
18941895
18951896 Asm->SwitchToSection(Asm->getObjFileLowering().getTextSection());
19961997
19971998 void DwarfDebug::EmitDebugInfo() {
19981999 // Start debug info section.
1999 Asm->SwitchToDataSection(TAI->getDwarfInfoSection());
2000 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfInfoSection());
20002001
20012002 EmitDebugInfoPerCU(ModuleCU);
20022003 }
20072008 // Check to see if it is worth the effort.
20082009 if (!Abbreviations.empty()) {
20092010 // Start the debug abbrev section.
2010 Asm->SwitchToDataSection(TAI->getDwarfAbbrevSection());
2011 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfAbbrevSection());
20112012
20122013 EmitLabel("abbrev_begin", 0);
20132014
20642065 const int MaxLineDelta = 255 + MinLineDelta;
20652066
20662067 // Start the dwarf line section.
2067 Asm->SwitchToDataSection(TAI->getDwarfLineSection());
2068 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfLineSection());
20682069
20692070 // Construct the section header.
20702071 EmitDifference("line_end", 0, "line_begin", 0, true);
22242225 TD->getPointerSize() : -TD->getPointerSize();
22252226
22262227 // Start the dwarf frame section.
2227 Asm->SwitchToDataSection(TAI->getDwarfFrameSection());
2228 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfFrameSection());
22282229
22292230 EmitLabel("debug_frame_common", 0);
22302231 EmitDifference("debug_frame_common_end", 0,
22642265 return;
22652266
22662267 // Start the dwarf frame section.
2267 Asm->SwitchToDataSection(TAI->getDwarfFrameSection());
2268 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfFrameSection());
22682269
22692270 EmitDifference("debug_frame_end", DebugFrameInfo.Number,
22702271 "debug_frame_begin", DebugFrameInfo.Number, true);
23282329 ///
23292330 void DwarfDebug::EmitDebugPubNames() {
23302331 // Start the dwarf pubnames section.
2331 Asm->SwitchToDataSection(TAI->getDwarfPubNamesSection());
2332 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfPubNamesSection());
23322333
23332334 EmitDebugPubNamesPerCU(ModuleCU);
23342335 }
23392340 // Check to see if it is worth the effort.
23402341 if (!StringPool.empty()) {
23412342 // Start the dwarf str section.
2342 Asm->SwitchToDataSection(TAI->getDwarfStrSection());
2343 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfStrSection());
23432344
23442345 // For each of strings in the string pool.
23452346 for (unsigned StringID = 1, N = StringPool.size();
23602361 ///
23612362 void DwarfDebug::EmitDebugLoc() {
23622363 // Start the dwarf loc section.
2363 Asm->SwitchToDataSection(TAI->getDwarfLocSection());
2364 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfLocSection());
23642365 Asm->EOL();
23652366 }
23662367
23682369 ///
23692370 void DwarfDebug::EmitDebugARanges() {
23702371 // Start the dwarf aranges section.
2371 Asm->SwitchToDataSection(TAI->getDwarfARangesSection());
2372 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfARangesSection());
23722373
23732374 // FIXME - Mock up
23742375 #if 0
24042405 ///
24052406 void DwarfDebug::EmitDebugRanges() {
24062407 // Start the dwarf ranges section.
2407 Asm->SwitchToDataSection(TAI->getDwarfRangesSection());
2408 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfRangesSection());
24082409 Asm->EOL();
24092410 }
24102411
24112412 /// EmitDebugMacInfo - Emit visible names into a debug macinfo section.
24122413 ///
24132414 void DwarfDebug::EmitDebugMacInfo() {
2414 if (const char *LineInfoDirective = TAI->getDwarfMacroInfoSection()) {
2415 if (const MCSection *LineInfo =
2416 Asm->getObjFileLowering().getDwarfMacroInfoSection()) {
24152417 // Start the dwarf macinfo section.
2416 Asm->SwitchToDataSection(LineInfoDirective);
2418 Asm->SwitchToSection(LineInfo);
24172419 Asm->EOL();
24182420 }
24192421 }
24432445 if (!ModuleCU)
24442446 return;
24452447
2446 Asm->SwitchToDataSection(TAI->getDwarfDebugInlineSection());
2448 Asm->SwitchToSection(Asm->getObjFileLowering().getDwarfDebugInlineSection());
24472449 Asm->EOL();
24482450 EmitDifference("debug_inlined_end", 1,
24492451 "debug_inlined_begin", 1, true);
5656 WeakRefDirective = "\t.weak\t";
5757 SetDirective = "\t.set\t";
5858 DwarfRequiresFrameSection = false;
59 DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"\",%progbits";
60 DwarfInfoSection = "\t.section\t.debug_info,\"\",%progbits";
61 DwarfLineSection = "\t.section\t.debug_line,\"\",%progbits";
62 DwarfFrameSection = "\t.section\t.debug_frame,\"\",%progbits";
63 DwarfPubNamesSection ="\t.section\t.debug_pubnames,\"\",%progbits";
64 DwarfPubTypesSection ="\t.section\t.debug_pubtypes,\"\",%progbits";
65 DwarfStrSection = "\t.section\t.debug_str,\"\",%progbits";
66 DwarfLocSection = "\t.section\t.debug_loc,\"\",%progbits";
67 DwarfARangesSection = "\t.section\t.debug_aranges,\"\",%progbits";
68 DwarfRangesSection = "\t.section\t.debug_ranges,\"\",%progbits";
69 DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"\",%progbits";
7059
7160 SupportsDebugInformation = true;
7261 }
3232 AbsoluteEHSectionOffsets = false;
3333 SupportsDebugInformation = true;
3434 DwarfSectionOffsetDirective = "\t.secrel32\t";
35 DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"dr\"";
36 DwarfInfoSection = "\t.section\t.debug_info,\"dr\"";
37 DwarfLineSection = "\t.section\t.debug_line,\"dr\"";
38 DwarfFrameSection = "\t.section\t.debug_frame,\"dr\"";
39 DwarfPubNamesSection ="\t.section\t.debug_pubnames,\"dr\"";
40 DwarfPubTypesSection ="\t.section\t.debug_pubtypes,\"dr\"";
41 DwarfStrSection = "\t.section\t.debug_str,\"dr\"";
42 DwarfLocSection = "\t.section\t.debug_loc,\"dr\"";
43 DwarfARangesSection = "\t.section\t.debug_aranges,\"dr\"";
44 DwarfRangesSection = "\t.section\t.debug_ranges,\"dr\"";
45 DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"dr\"";
4635 }
4736
3333
3434 SupportsDebugInformation = true;
3535 NeedsSet = true;
36 DwarfAbbrevSection = "\t.section .debug_abbrev,\"\",@progbits";
37 DwarfInfoSection = "\t.section .debug_info,\"\",@progbits";
38 DwarfLineSection = "\t.section .debug_line,\"\",@progbits";
39 DwarfFrameSection = "\t.section .debug_frame,\"\",@progbits";
40 DwarfPubNamesSection = "\t.section .debug_pubnames,\"\",@progbits";
41 DwarfPubTypesSection = "\t.section .debug_pubtypes,\"\",progbits";
42 DwarfStrSection = "\t.section .debug_str,\"MS\",@progbits,1";
43 DwarfLocSection = "\t.section .debug_loc,\"\",@progbits";
44 DwarfARangesSection = "\t.section .debug_aranges,\"\",@progbits";
45 DwarfRangesSection = "\t.section .debug_ranges,\"\",@progbits";
46 DwarfMacroInfoSection = 0; // macro info not supported.
4736
4837 // Exception handling is not supported on CellSPU (think about it: you only
4938 // have 256K for code+data. Would you support exception handling?)
4040 // doesn't hurt anything.
4141 // FIXME: I need to get this from Triple.
4242 Is_EHSymbolPrivate = false;
43
44 DwarfAbbrevSection = ".section __DWARF,__debug_abbrev,regular,debug";
45 DwarfInfoSection = ".section __DWARF,__debug_info,regular,debug";
46 DwarfLineSection = ".section __DWARF,__debug_line,regular,debug";
47 DwarfFrameSection = ".section __DWARF,__debug_frame,regular,debug";
48 DwarfPubNamesSection = ".section __DWARF,__debug_pubnames,regular,debug";
49 DwarfPubTypesSection = ".section __DWARF,__debug_pubtypes,regular,debug";
50 DwarfStrSection = ".section __DWARF,__debug_str,regular,debug";
51 DwarfLocSection = ".section __DWARF,__debug_loc,regular,debug";
52 DwarfARangesSection = ".section __DWARF,__debug_aranges,regular,debug";
53 DwarfRangesSection = ".section __DWARF,__debug_ranges,regular,debug";
54 DwarfMacroInfoSection = ".section __DWARF,__debug_macinfo,regular,debug";
5543 }
5644
4040 // Debug Information
4141 AbsoluteDebugSectionOffsets = true;
4242 SupportsDebugInformation = true;
43 DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"\",@progbits";
44 DwarfInfoSection = "\t.section\t.debug_info,\"\",@progbits";
45 DwarfLineSection = "\t.section\t.debug_line,\"\",@progbits";
46 DwarfFrameSection = "\t.section\t.debug_frame,\"\",@progbits";
47 DwarfPubNamesSection ="\t.section\t.debug_pubnames,\"\",@progbits";
48 DwarfPubTypesSection ="\t.section\t.debug_pubtypes,\"\",@progbits";
49 DwarfStrSection = "\t.section\t.debug_str,\"\",@progbits";
50 DwarfLocSection = "\t.section\t.debug_loc,\"\",@progbits";
51 DwarfARangesSection = "\t.section\t.debug_aranges,\"\",@progbits";
52 DwarfRangesSection = "\t.section\t.debug_ranges,\"\",@progbits";
53 DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"\",@progbits";
5443
5544 PCSymbol = ".";
5645
8383 GlobalEHDirective = 0;
8484 SupportsWeakOmittedEHFrame = true;
8585 DwarfSectionOffsetDirective = 0;
86 DwarfAbbrevSection = ".debug_abbrev";
87 DwarfInfoSection = ".debug_info";
88 DwarfLineSection = ".debug_line";
89 DwarfFrameSection = ".debug_frame";
90 DwarfPubNamesSection = ".debug_pubnames";
91 DwarfPubTypesSection = ".debug_pubtypes";
92 DwarfDebugInlineSection = ".debug_inlined";
93 DwarfStrSection = ".debug_str";
94 DwarfLocSection = ".debug_loc";
95 DwarfARangesSection = ".debug_aranges";
96 DwarfRangesSection = ".debug_ranges";
97 DwarfMacroInfoSection = ".debug_macinfo";
86
9887 AsmTransCBE = 0;
9988 }
10089
3737 StaticDtorSection = 0;
3838 LSDASection = 0;
3939 EHFrameSection = 0;
40
41 DwarfAbbrevSection = 0;
42 DwarfInfoSection = 0;
43 DwarfLineSection = 0;
44 DwarfFrameSection = 0;
45 DwarfPubNamesSection = 0;
46 DwarfPubTypesSection = 0;
47 DwarfDebugInlineSection = 0;
48 DwarfStrSection = 0;
49 DwarfLocSection = 0;
50 DwarfARangesSection = 0;
51 DwarfRangesSection = 0;
52 DwarfMacroInfoSection = 0;
4053 }
4154
4255 TargetLoweringObjectFile::~TargetLoweringObjectFile() {
304317 StaticDtorSection =
305318 getOrCreateSection(".dtors", false, SectionKind::getDataRel());
306319
320 // Exception Handling Sections.
307321
308322 // FIXME: We're emitting LSDA info into a readonly section on ELF, even though
309323 // it contains relocatable pointers. In PIC mode, this is probably a big
313327 getOrCreateSection(".gcc_except_table", false, SectionKind::getReadOnly());
314328 EHFrameSection =
315329 getOrCreateSection(".eh_frame", false, SectionKind::getDataRel());
330
331 // Debug Info Sections.
332 DwarfAbbrevSection =
333 getOrCreateSection(".debug_abbrev", false, SectionKind::getMetadata());
334 DwarfInfoSection =
335 getOrCreateSection(".debug_info", false, SectionKind::getMetadata());
336 DwarfLineSection =
337 getOrCreateSection(".debug_line", false, SectionKind::getMetadata());
338 DwarfFrameSection =
339 getOrCreateSection(".debug_frame", false, SectionKind::getMetadata());
340 DwarfPubNamesSection =
341 getOrCreateSection(".debug_pubnames", false, SectionKind::getMetadata());
342 DwarfPubTypesSection =
343 getOrCreateSection(".debug_pubtypes", false, SectionKind::getMetadata());
344 DwarfStrSection =
345 getOrCreateSection(".debug_str", false, SectionKind::getMetadata());
346 DwarfLocSection =
347 getOrCreateSection(".debug_loc", false, SectionKind::getMetadata());
348 DwarfARangesSection =
349 getOrCreateSection(".debug_aranges", false, SectionKind::getMetadata());
350 DwarfRangesSection =
351 getOrCreateSection(".debug_ranges", false, SectionKind::getMetadata());
352 DwarfMacroInfoSection =
353 getOrCreateSection(".debug_macinfo", false, SectionKind::getMetadata());
316354 }
317355
318356
548586 getOrCreateSection(".mod_term_func", true, SectionKind::getDataRel());
549587 }
550588
589 // Exception Handling.
551590 LSDASection = getOrCreateSection("__DATA,__gcc_except_tab", false,
552591 SectionKind::getDataRel());
553592 EHFrameSection =
554593 getOrCreateSection("__TEXT,__eh_frame,coalesced,no_toc+strip_static_syms"
555594 "+live_support", false, SectionKind::getReadOnly());
595
596 // Debug Information.
597 // FIXME: Don't use 'directive' syntax: need flags for debug/regular??
598 // FIXME: Need __DWARF segment.
599 DwarfAbbrevSection =
600 getOrCreateSection(".section __DWARF,__debug_abbrev,regular,debug", true,
601 SectionKind::getMetadata());
602 DwarfInfoSection =
603 getOrCreateSection(".section __DWARF,__debug_info,regular,debug", true,
604 SectionKind::getMetadata());
605 DwarfLineSection =
606 getOrCreateSection(".section __DWARF,__debug_line,regular,debug", true,
607 SectionKind::getMetadata());
608 DwarfFrameSection =
609 getOrCreateSection(".section __DWARF,__debug_frame,regular,debug", true,
610 SectionKind::getMetadata());
611 DwarfPubNamesSection =
612 getOrCreateSection(".section __DWARF,__debug_pubnames,regular,debug", true,
613 SectionKind::getMetadata());
614 DwarfPubTypesSection =
615 getOrCreateSection(".section __DWARF,__debug_pubtypes,regular,debug", true,
616 SectionKind::getMetadata());
617 DwarfStrSection =
618 getOrCreateSection(".section __DWARF,__debug_str,regular,debug", true,
619 SectionKind::getMetadata());
620 DwarfLocSection =
621 getOrCreateSection(".section __DWARF,__debug_loc,regular,debug", true,
622 SectionKind::getMetadata());
623 DwarfARangesSection =
624 getOrCreateSection(".section __DWARF,__debug_aranges,regular,debug", true,
625 SectionKind::getMetadata());
626 DwarfRangesSection =
627 getOrCreateSection(".section __DWARF,__debug_ranges,regular,debug", true,
628 SectionKind::getMetadata());
629 DwarfMacroInfoSection =
630 getOrCreateSection(".section __DWARF,__debug_macinfo,regular,debug", true,
631 SectionKind::getMetadata());
632 DwarfDebugInlineSection =
633 getOrCreateSection(".section __DWARF,__debug_inlined,regular,debug", true,
634 SectionKind::getMetadata());
556635 }
557636
558637 const MCSection *TargetLoweringObjectFileMachO::
664743 getOrCreateSection(".ctors", false, SectionKind::getDataRel());
665744 StaticDtorSection =
666745 getOrCreateSection(".dtors", false, SectionKind::getDataRel());
746
747
748 // Debug info.
749 // FIXME: Don't use 'directive' mode here.
750 DwarfAbbrevSection =
751 getOrCreateSection("\t.section\t.debug_abbrev,\"dr\"",
752 true, SectionKind::getMetadata());
753 DwarfInfoSection =
754 getOrCreateSection("\t.section\t.debug_info,\"dr\"",
755 true, SectionKind::getMetadata());
756 DwarfLineSection =
757 getOrCreateSection("\t.section\t.debug_line,\"dr\"",
758 true, SectionKind::getMetadata());
759 DwarfFrameSection =
760 getOrCreateSection("\t.section\t.debug_frame,\"dr\"",
761 true, SectionKind::getMetadata());
762 DwarfPubNamesSection =
763 getOrCreateSection("\t.section\t.debug_pubnames,\"dr\"",
764 true, SectionKind::getMetadata());
765 DwarfPubTypesSection =
766 getOrCreateSection("\t.section\t.debug_pubtypes,\"dr\"",
767 true, SectionKind::getMetadata());
768 DwarfStrSection =
769 getOrCreateSection("\t.section\t.debug_str,\"dr\"",
770 true, SectionKind::getMetadata());
771 DwarfLocSection =
772 getOrCreateSection("\t.section\t.debug_loc,\"dr\"",
773 true, SectionKind::getMetadata());
774 DwarfARangesSection =
775 getOrCreateSection("\t.section\t.debug_aranges,\"dr\"",
776 true, SectionKind::getMetadata());
777 DwarfRangesSection =
778 getOrCreateSection("\t.section\t.debug_ranges,\"dr\"",
779 true, SectionKind::getMetadata());
780 DwarfMacroInfoSection =
781 getOrCreateSection("\t.section\t.debug_macinfo,\"dr\"",
782 true, SectionKind::getMetadata());
667783 }
668784
669785 void TargetLoweringObjectFileCOFF::
7373 ProtectedDirective = "\t.globl\t";
7474
7575 SupportsDebugInformation = true;
76 DwarfDebugInlineSection = ".section __DWARF,__debug_inlined,regular,debug";
7776 DwarfUsesInlineInfoSection = true;
7877
7978 // Exceptions handling
9796 // Debug Information
9897 AbsoluteDebugSectionOffsets = true;
9998 SupportsDebugInformation = true;
100 DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"\",@progbits";
101 DwarfInfoSection = "\t.section\t.debug_info,\"\",@progbits";
102 DwarfLineSection = "\t.section\t.debug_line,\"\",@progbits";
103 DwarfFrameSection = "\t.section\t.debug_frame,\"\",@progbits";
104 DwarfPubNamesSection ="\t.section\t.debug_pubnames,\"\",@progbits";
105 DwarfPubTypesSection ="\t.section\t.debug_pubtypes,\"\",@progbits";
106 DwarfStrSection = "\t.section\t.debug_str,\"\",@progbits";
107 DwarfLocSection = "\t.section\t.debug_loc,\"\",@progbits";
108 DwarfARangesSection = "\t.section\t.debug_aranges,\"\",@progbits";
109 DwarfRangesSection = "\t.section\t.debug_ranges,\"\",@progbits";
110 DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"\",@progbits";
11199
112100 // Exceptions handling
113101 SupportsExceptionHandling = true;
2626 // Debug
2727 HasLEB128 = true;
2828 AbsoluteDebugSectionOffsets = true;
29
30 DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"\",@progbits";
31 DwarfInfoSection = "\t.section\t.debug_info,\"\",@progbits";
32 DwarfLineSection = "\t.section\t.debug_line,\"\",@progbits";
33 DwarfFrameSection = "\t.section\t.debug_frame,\"\",@progbits";
34 DwarfPubNamesSection = "\t.section\t.debug_pubnames,\"\",@progbits";
35 DwarfPubTypesSection = "\t.section\t.debug_pubtypes,\"\",@progbits";
36 DwarfStrSection = "\t.section\t.debug_str,\"\",@progbits";
37 DwarfLocSection = "\t.section\t.debug_loc,\"\",@progbits";
38 DwarfARangesSection = "\t.section\t.debug_aranges,\"\",@progbits";
39 DwarfRangesSection = "\t.section\t.debug_ranges,\"\",@progbits";
40 DwarfMacroInfoSection = "\t.section\t.debug_macinfo,\"\",@progbits";
4129 }
4230