1 //===-- llvm/Target/TargetAsmInfo.h - Asm info ------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file contains a class to be used as the basis for target specific
11 // asm writers. This class primarily takes care of global printing constants,
12 // which are used in very similar ways across all targets.
14 //===----------------------------------------------------------------------===//
16 #ifndef LLVM_TARGET_ASM_INFO_H
17 #define LLVM_TARGET_ASM_INFO_H
19 #include "llvm/ADT/StringMap.h"
20 #include "llvm/Support/DataTypes.h"
24 // DWARF encoding query type
25 namespace DwarfEncoding {
33 namespace SectionKind {
35 Unknown = 0, ///< Custom section
36 Text, ///< Text section
37 Data, ///< Data section
39 ROData, ///< Readonly data section
40 RODataMergeStr, ///< Readonly data section (mergeable strings)
41 RODataMergeConst, ///< Readonly data section (mergeable constants)
42 ThreadData, ///< Initialized TLS data objects
43 ThreadBSS ///< Uninitialized TLS data objects
47 namespace SectionFlags {
51 Code = 1 << 0, ///< Section contains code
52 Writeable = 1 << 1, ///< Section is writeable
53 BSS = 1 << 2, ///< Section contains only zeroes
54 Mergeable = 1 << 3, ///< Section contains mergeable data
55 Strings = 1 << 4, ///< Section contains null-terminated strings
56 TLS = 1 << 5, ///< Section contains thread-local data
57 Debug = 1 << 6, ///< Section contains debug data
58 Linkonce = 1 << 7, ///< Section is linkonce
60 // Some gap for future flags
61 Named = 1 << 23, ///< Section is named
62 EntitySize = 0xFF << 24 ///< Entity size for mergeable sections
65 static inline unsigned getEntitySize(unsigned Flags) {
66 return (Flags >> 24) & 0xFF;
69 static inline unsigned setEntitySize(unsigned Flags, unsigned Size) {
70 return ((Flags & ~EntitySize) | ((Size & 0xFF) << 24));
79 friend class TargetAsmInfo;
80 friend class StringMapEntry<Section>;
85 explicit Section(unsigned F = SectionFlags::Invalid):Flags(F) { }
87 bool isNamed() const { return Flags & SectionFlags::Named; }
88 unsigned getEntitySize() const { return (Flags >> 24) & 0xFF; }
89 const std::string& getName() const { return Name; }
92 /// TargetAsmInfo - This class is intended to be used as a base class for asm
93 /// properties and features specific to the target.
96 mutable StringMap<Section> Sections;
98 //===------------------------------------------------------------------===//
99 // Properties to be set by the target writer, used to configure asm printer.
102 /// TextSection - Section directive for standard text.
104 const char *TextSection; // Defaults to ".text".
105 const Section *TextSection_;
107 /// DataSection - Section directive for standard data.
109 const char *DataSection; // Defaults to ".data".
110 const Section *DataSection_;
112 /// BSSSection - Section directive for uninitialized data. Null if this
113 /// target doesn't support a BSS section.
115 const char *BSSSection; // Default to ".bss".
116 const Section *BSSSection_;
118 /// ReadOnlySection - This is the directive that is emitted to switch to a
119 /// read-only section for constant data (e.g. data declared const,
121 const char *ReadOnlySection; // Defaults to NULL
122 const Section *ReadOnlySection_;
124 /// TLSDataSection - Section directive for Thread Local data.
126 const char *TLSDataSection;// Defaults to ".section .tdata,"awT",@progbits".
127 const Section *TLSDataSection_;
129 /// TLSBSSSection - Section directive for Thread Local uninitialized data.
130 /// Null if this target doesn't support a BSS section.
132 const char *TLSBSSSection;// Default to ".section .tbss,"awT",@nobits".
133 const Section *TLSBSSSection_;
135 /// ZeroFillDirective - Directive for emitting a global to the ZeroFill
136 /// section on this target. Null if this target doesn't support zerofill.
137 const char *ZeroFillDirective; // Default is null.
139 /// NonexecutableStackDirective - Directive for declaring to the
140 /// linker and beyond that the emitted code does not require stack
141 /// memory to be executable.
142 const char *NonexecutableStackDirective; // Default is null.
144 /// NeedsSet - True if target asm treats expressions in data directives
145 /// as linktime-relocatable. For assembly-time computation, we need to
146 /// use a .set. Thus:
149 /// is computed at assembly time, while
151 /// is relocated if the relative locations of x and y change at linktime.
152 /// We want both these things in different places.
153 bool NeedsSet; // Defaults to false.
155 /// MaxInstLength - This is the maximum possible length of an instruction,
156 /// which is needed to compute the size of an inline asm.
157 unsigned MaxInstLength; // Defaults to 4.
159 /// PCSymbol - The symbol used to represent the current PC. Used in PC
160 /// relative expressions.
161 const char *PCSymbol; // Defaults to "$".
163 /// SeparatorChar - This character, if specified, is used to separate
164 /// instructions from each other when on the same line. This is used to
165 /// measure inline asm instructions.
166 char SeparatorChar; // Defaults to ';'
168 /// CommentString - This indicates the comment character used by the
170 const char *CommentString; // Defaults to "#"
172 /// GlobalPrefix - If this is set to a non-empty string, it is prepended
173 /// onto all global symbols. This is often used for "_" or ".".
174 const char *GlobalPrefix; // Defaults to ""
176 /// PrivateGlobalPrefix - This prefix is used for globals like constant
177 /// pool entries that are completely private to the .o file and should not
178 /// have names in the .o file. This is often "." or "L".
179 const char *PrivateGlobalPrefix; // Defaults to "."
181 /// JumpTableSpecialLabelPrefix - If not null, a extra (dead) label is
182 /// emitted before jump tables with the specified prefix.
183 const char *JumpTableSpecialLabelPrefix; // Default to null.
185 /// GlobalVarAddrPrefix/Suffix - If these are nonempty, these strings
186 /// will enclose any GlobalVariable (that isn't a function)
188 const char *GlobalVarAddrPrefix; // Defaults to ""
189 const char *GlobalVarAddrSuffix; // Defaults to ""
191 /// FunctionAddrPrefix/Suffix - If these are nonempty, these strings
192 /// will enclose any GlobalVariable that points to a function.
193 /// For example, this is used by the IA64 backend to materialize
194 /// function descriptors, by decorating the ".data8" object with the
195 /// @verbatim @fptr( ) @endverbatim
196 /// link-relocation operator.
198 const char *FunctionAddrPrefix; // Defaults to ""
199 const char *FunctionAddrSuffix; // Defaults to ""
201 /// PersonalityPrefix/Suffix - If these are nonempty, these strings will
202 /// enclose any personality function in the common frame section.
204 const char *PersonalityPrefix; // Defaults to ""
205 const char *PersonalitySuffix; // Defaults to ""
207 /// NeedsIndirectEncoding - If set, we need to set the indirect encoding bit
210 bool NeedsIndirectEncoding; // Defaults to false
212 /// InlineAsmStart/End - If these are nonempty, they contain a directive to
213 /// emit before and after an inline assembly statement.
214 const char *InlineAsmStart; // Defaults to "#APP\n"
215 const char *InlineAsmEnd; // Defaults to "#NO_APP\n"
217 /// AssemblerDialect - Which dialect of an assembler variant to use.
218 unsigned AssemblerDialect; // Defaults to 0
220 /// StringConstantPrefix - Prefix for FEs to use when generating unnamed
221 /// constant strings. These names get run through the Mangler later; if
222 /// you want the Mangler not to add the GlobalPrefix as well,
223 /// use '\1' as the first character.
224 const char *StringConstantPrefix; // Defaults to ".str"
226 //===--- Data Emission Directives -------------------------------------===//
228 /// ZeroDirective - this should be set to the directive used to get some
229 /// number of zero bytes emitted to the current section. Common cases are
230 /// "\t.zero\t" and "\t.space\t". If this is set to null, the
231 /// Data*bitsDirective's will be used to emit zero bytes.
232 const char *ZeroDirective; // Defaults to "\t.zero\t"
233 const char *ZeroDirectiveSuffix; // Defaults to ""
235 /// AsciiDirective - This directive allows emission of an ascii string with
236 /// the standard C escape characters embedded into it.
237 const char *AsciiDirective; // Defaults to "\t.ascii\t"
239 /// AscizDirective - If not null, this allows for special handling of
240 /// zero terminated strings on this target. This is commonly supported as
241 /// ".asciz". If a target doesn't support this, it can be set to null.
242 const char *AscizDirective; // Defaults to "\t.asciz\t"
244 /// DataDirectives - These directives are used to output some unit of
245 /// integer data to the current section. If a data directive is set to
246 /// null, smaller data directives will be used to emit the large sizes.
247 const char *Data8bitsDirective; // Defaults to "\t.byte\t"
248 const char *Data16bitsDirective; // Defaults to "\t.short\t"
249 const char *Data32bitsDirective; // Defaults to "\t.long\t"
250 const char *Data64bitsDirective; // Defaults to "\t.quad\t"
252 //===--- Alignment Information ----------------------------------------===//
254 /// AlignDirective - The directive used to emit round up to an alignment
257 const char *AlignDirective; // Defaults to "\t.align\t"
259 /// AlignmentIsInBytes - If this is true (the default) then the asmprinter
260 /// emits ".align N" directives, where N is the number of bytes to align to.
261 /// Otherwise, it emits ".align log2(N)", e.g. 3 to align to an 8 byte
263 bool AlignmentIsInBytes; // Defaults to true
265 /// TextAlignFillValue - If non-zero, this is used to fill the executable
266 /// space created as the result of a alignment directive.
267 unsigned TextAlignFillValue;
269 //===--- Section Switching Directives ---------------------------------===//
271 /// SwitchToSectionDirective - This is the directive used when we want to
272 /// emit a global to an arbitrary section. The section name is emited after
274 const char *SwitchToSectionDirective; // Defaults to "\t.section\t"
276 /// TextSectionStartSuffix - This is printed after each start of section
277 /// directive for text sections.
278 const char *TextSectionStartSuffix; // Defaults to "".
280 /// DataSectionStartSuffix - This is printed after each start of section
281 /// directive for data sections.
282 const char *DataSectionStartSuffix; // Defaults to "".
284 /// SectionEndDirectiveSuffix - If non-null, the asm printer will close each
285 /// section with the section name and this suffix printed.
286 const char *SectionEndDirectiveSuffix;// Defaults to null.
288 /// ConstantPoolSection - This is the section that we SwitchToSection right
289 /// before emitting the constant pool for a function.
290 const char *ConstantPoolSection; // Defaults to "\t.section .rodata"
292 /// JumpTableDataSection - This is the section that we SwitchToSection right
293 /// before emitting the jump tables for a function when the relocation model
295 const char *JumpTableDataSection; // Defaults to "\t.section .rodata"
297 /// JumpTableDirective - if non-null, the directive to emit before a jump
299 const char *JumpTableDirective;
301 /// CStringSection - If not null, this allows for special handling of
302 /// cstring constants (null terminated string that does not contain any
303 /// other null bytes) on this target. This is commonly supported as
305 const char *CStringSection; // Defaults to NULL
306 const Section *CStringSection_;
308 /// StaticCtorsSection - This is the directive that is emitted to switch to
309 /// a section to emit the static constructor list.
310 /// Defaults to "\t.section .ctors,\"aw\",@progbits".
311 const char *StaticCtorsSection;
313 /// StaticDtorsSection - This is the directive that is emitted to switch to
314 /// a section to emit the static destructor list.
315 /// Defaults to "\t.section .dtors,\"aw\",@progbits".
316 const char *StaticDtorsSection;
318 /// FourByteConstantSection, EightByteConstantSection,
319 /// SixteenByteConstantSection - These are special sections where we place
320 /// 4-, 8-, and 16- byte constant literals.
321 const char *FourByteConstantSection;
322 const Section *FourByteConstantSection_;
323 const char *EightByteConstantSection;
324 const Section *EightByteConstantSection_;
325 const char *SixteenByteConstantSection;
326 const Section *SixteenByteConstantSection_;
328 //===--- Global Variable Emission Directives --------------------------===//
330 /// GlobalDirective - This is the directive used to declare a global entity.
332 const char *GlobalDirective; // Defaults to NULL.
334 /// SetDirective - This is the name of a directive that can be used to tell
335 /// the assembler to set the value of a variable to some expression.
336 const char *SetDirective; // Defaults to null.
338 /// LCOMMDirective - This is the name of a directive (if supported) that can
339 /// be used to efficiently declare a local (internal) block of zero
340 /// initialized data in the .bss/.data section. The syntax expected is:
341 /// @verbatim <LCOMMDirective> SYMBOLNAME LENGTHINBYTES, ALIGNMENT
343 const char *LCOMMDirective; // Defaults to null.
345 const char *COMMDirective; // Defaults to "\t.comm\t".
347 /// COMMDirectiveTakesAlignment - True if COMMDirective take a third
348 /// argument that specifies the alignment of the declaration.
349 bool COMMDirectiveTakesAlignment; // Defaults to true.
351 /// HasDotTypeDotSizeDirective - True if the target has .type and .size
352 /// directives, this is true for most ELF targets.
353 bool HasDotTypeDotSizeDirective; // Defaults to true.
355 /// UsedDirective - This directive, if non-null, is used to declare a global
356 /// as being used somehow that the assembler can't see. This prevents dead
357 /// code elimination on some targets.
358 const char *UsedDirective; // Defaults to null.
360 /// WeakRefDirective - This directive, if non-null, is used to declare a
361 /// global as being a weak undefined symbol.
362 const char *WeakRefDirective; // Defaults to null.
364 /// WeakDefDirective - This directive, if non-null, is used to declare a
365 /// global as being a weak defined symbol.
366 const char *WeakDefDirective; // Defaults to null.
368 /// HiddenDirective - This directive, if non-null, is used to declare a
369 /// global or function as having hidden visibility.
370 const char *HiddenDirective; // Defaults to "\t.hidden\t".
372 /// ProtectedDirective - This directive, if non-null, is used to declare a
373 /// global or function as having protected visibility.
374 const char *ProtectedDirective; // Defaults to "\t.protected\t".
376 //===--- Dwarf Emission Directives -----------------------------------===//
378 /// AbsoluteDebugSectionOffsets - True if we should emit abolute section
379 /// offsets for debug information. Defaults to false.
380 bool AbsoluteDebugSectionOffsets;
382 /// AbsoluteEHSectionOffsets - True if we should emit abolute section
383 /// offsets for EH information. Defaults to false.
384 bool AbsoluteEHSectionOffsets;
386 /// HasLEB128 - True if target asm supports leb128 directives.
388 bool HasLEB128; // Defaults to false.
390 /// hasDotLocAndDotFile - True if target asm supports .loc and .file
391 /// directives for emitting debugging information.
393 bool HasDotLocAndDotFile; // Defaults to false.
395 /// SupportsDebugInformation - True if target supports emission of debugging
397 bool SupportsDebugInformation;
399 /// SupportsExceptionHandling - True if target supports
400 /// exception handling.
402 bool SupportsExceptionHandling; // Defaults to false.
404 /// RequiresFrameSection - true if the Dwarf2 output needs a frame section
406 bool DwarfRequiresFrameSection; // Defaults to true.
408 /// GlobalEHDirective - This is the directive used to make exception frame
409 /// tables globally visible.
411 const char *GlobalEHDirective; // Defaults to NULL.
413 /// SupportsWeakEmptyEHFrame - True if target assembler and linker will
414 /// handle a weak_definition of constant 0 for an omitted EH frame.
415 bool SupportsWeakOmittedEHFrame; // Defaults to true.
417 /// DwarfSectionOffsetDirective - Special section offset directive.
418 const char* DwarfSectionOffsetDirective; // Defaults to NULL
420 /// DwarfAbbrevSection - Section directive for Dwarf abbrev.
422 const char *DwarfAbbrevSection; // Defaults to ".debug_abbrev".
424 /// DwarfInfoSection - Section directive for Dwarf info.
426 const char *DwarfInfoSection; // Defaults to ".debug_info".
428 /// DwarfLineSection - Section directive for Dwarf info.
430 const char *DwarfLineSection; // Defaults to ".debug_line".
432 /// DwarfFrameSection - Section directive for Dwarf info.
434 const char *DwarfFrameSection; // Defaults to ".debug_frame".
436 /// DwarfPubNamesSection - Section directive for Dwarf info.
438 const char *DwarfPubNamesSection; // Defaults to ".debug_pubnames".
440 /// DwarfPubTypesSection - Section directive for Dwarf info.
442 const char *DwarfPubTypesSection; // Defaults to ".debug_pubtypes".
444 /// DwarfStrSection - Section directive for Dwarf info.
446 const char *DwarfStrSection; // Defaults to ".debug_str".
448 /// DwarfLocSection - Section directive for Dwarf info.
450 const char *DwarfLocSection; // Defaults to ".debug_loc".
452 /// DwarfARangesSection - Section directive for Dwarf info.
454 const char *DwarfARangesSection; // Defaults to ".debug_aranges".
456 /// DwarfRangesSection - Section directive for Dwarf info.
458 const char *DwarfRangesSection; // Defaults to ".debug_ranges".
460 /// DwarfMacInfoSection - Section directive for Dwarf info.
462 const char *DwarfMacInfoSection; // Defaults to ".debug_macinfo".
464 /// DwarfEHFrameSection - Section directive for Exception frames.
466 const char *DwarfEHFrameSection; // Defaults to ".eh_frame".
468 /// DwarfExceptionSection - Section directive for Exception table.
470 const char *DwarfExceptionSection; // Defaults to ".gcc_except_table".
472 //===--- CBE Asm Translation Table -----------------------------------===//
474 const char *const *AsmTransCBE; // Defaults to empty
478 virtual ~TargetAsmInfo();
480 const Section* getNamedSection(const char *Name,
481 unsigned Flags = SectionFlags::None) const;
482 const Section* getUnnamedSection(const char *Directive,
483 unsigned Flags = SectionFlags::None) const;
485 /// Measure the specified inline asm to determine an approximation of its
487 virtual unsigned getInlineAsmLength(const char *Str) const;
489 /// ExpandInlineAsm - This hook allows the target to expand an inline asm
490 /// call to be explicit llvm code if it wants to. This is useful for
491 /// turning simple inline asms into LLVM intrinsics, which gives the
492 /// compiler more information about the behavior of the code.
493 virtual bool ExpandInlineAsm(CallInst *CI) const {
497 /// PreferredEHDataFormat - This hook allows the target to select data
498 /// format used for encoding pointers in exception handling data. Reason is
499 /// 0 for data, 1 for code labels, 2 for function pointers. Global is true
500 /// if the symbol can be relocated.
501 virtual unsigned PreferredEHDataFormat(DwarfEncoding::Target Reason,
504 /// SectionKindForGlobal - This hook allows the target to select proper
505 /// section kind used for global emission.
506 virtual SectionKind::Kind
507 SectionKindForGlobal(const GlobalValue *GV) const;
510 /// SectionFlagsForGlobal - This hook allows the target to select proper
511 /// section flags either for given global or for section.
513 SectionFlagsForGlobal(const GlobalValue *GV = NULL,
514 const char* name = NULL) const;
516 /// SectionForGlobal - This hooks returns proper section name for given
517 /// global with all necessary flags and marks.
518 virtual std::string SectionForGlobal(const GlobalValue *GV) const;
520 // Helper methods for SectionForGlobal
521 virtual std::string UniqueSectionForGlobal(const GlobalValue* GV,
522 SectionKind::Kind kind) const;
524 virtual std::string PrintSectionFlags(unsigned flags) const { return ""; }
526 virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
530 const char *getTextSection() const {
533 const Section *getTextSection_() const {
536 const char *getDataSection() const {
539 const Section *getDataSection_() const {
542 const char *getBSSSection() const {
545 const Section *getBSSSection_() const {
548 const char *getReadOnlySection() const {
549 return ReadOnlySection;
551 const Section *getReadOnlySection_() const {
552 return ReadOnlySection_;
554 const char *getTLSDataSection() const {
555 return TLSDataSection;
557 const Section *getTLSDataSection_() const {
558 return TLSDataSection_;
560 const char *getTLSBSSSection() const {
561 return TLSBSSSection;
563 const Section *getTLSBSSSection_() const {
564 return TLSBSSSection_;
566 const char *getZeroFillDirective() const {
567 return ZeroFillDirective;
569 const char *getNonexecutableStackDirective() const {
570 return NonexecutableStackDirective;
572 bool needsSet() const {
575 const char *getPCSymbol() const {
578 char getSeparatorChar() const {
579 return SeparatorChar;
581 const char *getCommentString() const {
582 return CommentString;
584 const char *getGlobalPrefix() const {
587 const char *getPrivateGlobalPrefix() const {
588 return PrivateGlobalPrefix;
590 const char *getJumpTableSpecialLabelPrefix() const {
591 return JumpTableSpecialLabelPrefix;
593 const char *getGlobalVarAddrPrefix() const {
594 return GlobalVarAddrPrefix;
596 const char *getGlobalVarAddrSuffix() const {
597 return GlobalVarAddrSuffix;
599 const char *getFunctionAddrPrefix() const {
600 return FunctionAddrPrefix;
602 const char *getFunctionAddrSuffix() const {
603 return FunctionAddrSuffix;
605 const char *getPersonalityPrefix() const {
606 return PersonalityPrefix;
608 const char *getPersonalitySuffix() const {
609 return PersonalitySuffix;
611 bool getNeedsIndirectEncoding() const {
612 return NeedsIndirectEncoding;
614 const char *getInlineAsmStart() const {
615 return InlineAsmStart;
617 const char *getInlineAsmEnd() const {
620 unsigned getAssemblerDialect() const {
621 return AssemblerDialect;
623 const char *getStringConstantPrefix() const {
624 return StringConstantPrefix;
626 const char *getZeroDirective() const {
627 return ZeroDirective;
629 const char *getZeroDirectiveSuffix() const {
630 return ZeroDirectiveSuffix;
632 const char *getAsciiDirective() const {
633 return AsciiDirective;
635 const char *getAscizDirective() const {
636 return AscizDirective;
638 const char *getData8bitsDirective() const {
639 return Data8bitsDirective;
641 const char *getData16bitsDirective() const {
642 return Data16bitsDirective;
644 const char *getData32bitsDirective() const {
645 return Data32bitsDirective;
647 const char *getData64bitsDirective() const {
648 return Data64bitsDirective;
650 const char *getJumpTableDirective() const {
651 return JumpTableDirective;
653 const char *getAlignDirective() const {
654 return AlignDirective;
656 bool getAlignmentIsInBytes() const {
657 return AlignmentIsInBytes;
659 unsigned getTextAlignFillValue() const {
660 return TextAlignFillValue;
662 const char *getSwitchToSectionDirective() const {
663 return SwitchToSectionDirective;
665 const char *getTextSectionStartSuffix() const {
666 return TextSectionStartSuffix;
668 const char *getDataSectionStartSuffix() const {
669 return DataSectionStartSuffix;
671 const char *getSectionEndDirectiveSuffix() const {
672 return SectionEndDirectiveSuffix;
674 const char *getConstantPoolSection() const {
675 return ConstantPoolSection;
677 const char *getJumpTableDataSection() const {
678 return JumpTableDataSection;
680 const char *getCStringSection() const {
681 return CStringSection;
683 const Section *getCStringSection_() const {
684 return CStringSection_;
686 const char *getStaticCtorsSection() const {
687 return StaticCtorsSection;
689 const char *getStaticDtorsSection() const {
690 return StaticDtorsSection;
692 const char *getFourByteConstantSection() const {
693 return FourByteConstantSection;
695 const Section *getFourByteConstantSection_() const {
696 return FourByteConstantSection_;
698 const char *getEightByteConstantSection() const {
699 return EightByteConstantSection;
701 const Section *getEightByteConstantSection_() const {
702 return EightByteConstantSection_;
704 const char *getSixteenByteConstantSection() const {
705 return SixteenByteConstantSection;
707 const Section *getSixteenByteConstantSection_() const {
708 return SixteenByteConstantSection_;
710 const char *getGlobalDirective() const {
711 return GlobalDirective;
713 const char *getSetDirective() const {
716 const char *getLCOMMDirective() const {
717 return LCOMMDirective;
719 const char *getCOMMDirective() const {
720 return COMMDirective;
722 bool getCOMMDirectiveTakesAlignment() const {
723 return COMMDirectiveTakesAlignment;
725 bool hasDotTypeDotSizeDirective() const {
726 return HasDotTypeDotSizeDirective;
728 const char *getUsedDirective() const {
729 return UsedDirective;
731 const char *getWeakRefDirective() const {
732 return WeakRefDirective;
734 const char *getWeakDefDirective() const {
735 return WeakDefDirective;
737 const char *getHiddenDirective() const {
738 return HiddenDirective;
740 const char *getProtectedDirective() const {
741 return ProtectedDirective;
743 bool isAbsoluteDebugSectionOffsets() const {
744 return AbsoluteDebugSectionOffsets;
746 bool isAbsoluteEHSectionOffsets() const {
747 return AbsoluteEHSectionOffsets;
749 bool hasLEB128() const {
752 bool hasDotLocAndDotFile() const {
753 return HasDotLocAndDotFile;
755 bool doesSupportDebugInformation() const {
756 return SupportsDebugInformation;
758 bool doesSupportExceptionHandling() const {
759 return SupportsExceptionHandling;
761 bool doesDwarfRequireFrameSection() const {
762 return DwarfRequiresFrameSection;
764 const char *getGlobalEHDirective() const {
765 return GlobalEHDirective;
767 bool getSupportsWeakOmittedEHFrame() const {
768 return SupportsWeakOmittedEHFrame;
770 const char *getDwarfSectionOffsetDirective() const {
771 return DwarfSectionOffsetDirective;
773 const char *getDwarfAbbrevSection() const {
774 return DwarfAbbrevSection;
776 const char *getDwarfInfoSection() const {
777 return DwarfInfoSection;
779 const char *getDwarfLineSection() const {
780 return DwarfLineSection;
782 const char *getDwarfFrameSection() const {
783 return DwarfFrameSection;
785 const char *getDwarfPubNamesSection() const {
786 return DwarfPubNamesSection;
788 const char *getDwarfPubTypesSection() const {
789 return DwarfPubTypesSection;
791 const char *getDwarfStrSection() const {
792 return DwarfStrSection;
794 const char *getDwarfLocSection() const {
795 return DwarfLocSection;
797 const char *getDwarfARangesSection() const {
798 return DwarfARangesSection;
800 const char *getDwarfRangesSection() const {
801 return DwarfRangesSection;
803 const char *getDwarfMacInfoSection() const {
804 return DwarfMacInfoSection;
806 const char *getDwarfEHFrameSection() const {
807 return DwarfEHFrameSection;
809 const char *getDwarfExceptionSection() const {
810 return DwarfExceptionSection;
812 const char *const *getAsmCBE() const {