1 //===-- MObjectFileInfo.cpp - Object File Information ---------------------===//
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 #include "llvm/MC/MCObjectFileInfo.h"
11 #include "llvm/MC/MCContext.h"
12 #include "llvm/MC/MCSection.h"
13 #include "llvm/MC/MCSectionCOFF.h"
14 #include "llvm/MC/MCSectionELF.h"
15 #include "llvm/MC/MCSectionMachO.h"
16 #include "llvm/ADT/Triple.h"
19 void MCObjectFileInfo::InitMachOMCObjectFileInfo(Triple T) {
21 IsFunctionEHFrameSymbolPrivate = false;
22 SupportsWeakOmittedEHFrame = false;
24 PersonalityEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel
25 | dwarf::DW_EH_PE_sdata4;
26 LSDAEncoding = FDEEncoding = FDECFIEncoding = dwarf::DW_EH_PE_pcrel;
27 TTypeEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel |
28 dwarf::DW_EH_PE_sdata4;
30 // .comm doesn't support alignment before Leopard.
31 if (T.isMacOSX() && T.isMacOSXVersionLT(10, 5))
32 CommDirectiveSupportsAlignment = false;
35 = Ctx->getMachOSection("__TEXT", "__text",
36 MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS,
37 SectionKind::getText());
39 = Ctx->getMachOSection("__DATA", "__data", 0,
40 SectionKind::getDataRel());
42 TLSDataSection // .tdata
43 = Ctx->getMachOSection("__DATA", "__thread_data",
44 MCSectionMachO::S_THREAD_LOCAL_REGULAR,
45 SectionKind::getDataRel());
46 TLSBSSSection // .tbss
47 = Ctx->getMachOSection("__DATA", "__thread_bss",
48 MCSectionMachO::S_THREAD_LOCAL_ZEROFILL,
49 SectionKind::getThreadBSS());
51 // TODO: Verify datarel below.
53 = Ctx->getMachOSection("__DATA", "__thread_vars",
54 MCSectionMachO::S_THREAD_LOCAL_VARIABLES,
55 SectionKind::getDataRel());
58 = Ctx->getMachOSection("__DATA", "__thread_init",
59 MCSectionMachO::S_THREAD_LOCAL_INIT_FUNCTION_POINTERS,
60 SectionKind::getDataRel());
62 CStringSection // .cstring
63 = Ctx->getMachOSection("__TEXT", "__cstring",
64 MCSectionMachO::S_CSTRING_LITERALS,
65 SectionKind::getMergeable1ByteCString());
67 = Ctx->getMachOSection("__TEXT","__ustring", 0,
68 SectionKind::getMergeable2ByteCString());
69 FourByteConstantSection // .literal4
70 = Ctx->getMachOSection("__TEXT", "__literal4",
71 MCSectionMachO::S_4BYTE_LITERALS,
72 SectionKind::getMergeableConst4());
73 EightByteConstantSection // .literal8
74 = Ctx->getMachOSection("__TEXT", "__literal8",
75 MCSectionMachO::S_8BYTE_LITERALS,
76 SectionKind::getMergeableConst8());
78 // ld_classic doesn't support .literal16 in 32-bit mode, and ld64 falls back
79 // to using it in -static mode.
80 SixteenByteConstantSection = 0;
81 if (RelocM != Reloc::Static &&
82 T.getArch() != Triple::x86_64 && T.getArch() != Triple::ppc64)
83 SixteenByteConstantSection = // .literal16
84 Ctx->getMachOSection("__TEXT", "__literal16",
85 MCSectionMachO::S_16BYTE_LITERALS,
86 SectionKind::getMergeableConst16());
88 ReadOnlySection // .const
89 = Ctx->getMachOSection("__TEXT", "__const", 0,
90 SectionKind::getReadOnly());
93 = Ctx->getMachOSection("__TEXT", "__textcoal_nt",
94 MCSectionMachO::S_COALESCED |
95 MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS,
96 SectionKind::getText());
98 = Ctx->getMachOSection("__TEXT", "__const_coal",
99 MCSectionMachO::S_COALESCED,
100 SectionKind::getReadOnly());
101 ConstDataSection // .const_data
102 = Ctx->getMachOSection("__DATA", "__const", 0,
103 SectionKind::getReadOnlyWithRel());
105 = Ctx->getMachOSection("__DATA","__datacoal_nt",
106 MCSectionMachO::S_COALESCED,
107 SectionKind::getDataRel());
109 = Ctx->getMachOSection("__DATA","__common",
110 MCSectionMachO::S_ZEROFILL,
111 SectionKind::getBSS());
113 = Ctx->getMachOSection("__DATA","__bss", MCSectionMachO::S_ZEROFILL,
114 SectionKind::getBSS());
117 LazySymbolPointerSection
118 = Ctx->getMachOSection("__DATA", "__la_symbol_ptr",
119 MCSectionMachO::S_LAZY_SYMBOL_POINTERS,
120 SectionKind::getMetadata());
121 NonLazySymbolPointerSection
122 = Ctx->getMachOSection("__DATA", "__nl_symbol_ptr",
123 MCSectionMachO::S_NON_LAZY_SYMBOL_POINTERS,
124 SectionKind::getMetadata());
126 if (RelocM == Reloc::Static) {
128 = Ctx->getMachOSection("__TEXT", "__constructor", 0,
129 SectionKind::getDataRel());
131 = Ctx->getMachOSection("__TEXT", "__destructor", 0,
132 SectionKind::getDataRel());
135 = Ctx->getMachOSection("__DATA", "__mod_init_func",
136 MCSectionMachO::S_MOD_INIT_FUNC_POINTERS,
137 SectionKind::getDataRel());
139 = Ctx->getMachOSection("__DATA", "__mod_term_func",
140 MCSectionMachO::S_MOD_TERM_FUNC_POINTERS,
141 SectionKind::getDataRel());
144 // Exception Handling.
145 LSDASection = Ctx->getMachOSection("__TEXT", "__gcc_except_tab", 0,
146 SectionKind::getReadOnlyWithRel());
148 if (T.isMacOSX() && !T.isMacOSXVersionLT(10, 6))
149 CompactUnwindSection =
150 Ctx->getMachOSection("__LD", "__compact_unwind",
151 MCSectionMachO::S_ATTR_DEBUG,
152 SectionKind::getReadOnly());
154 // Debug Information.
155 DwarfAccelNamesSection =
156 Ctx->getMachOSection("__DWARF", "__apple_names",
157 MCSectionMachO::S_ATTR_DEBUG,
158 SectionKind::getMetadata());
159 DwarfAccelObjCSection =
160 Ctx->getMachOSection("__DWARF", "__apple_objc",
161 MCSectionMachO::S_ATTR_DEBUG,
162 SectionKind::getMetadata());
163 // 16 character section limit...
164 DwarfAccelNamespaceSection =
165 Ctx->getMachOSection("__DWARF", "__apple_namespac",
166 MCSectionMachO::S_ATTR_DEBUG,
167 SectionKind::getMetadata());
168 DwarfAccelTypesSection =
169 Ctx->getMachOSection("__DWARF", "__apple_types",
170 MCSectionMachO::S_ATTR_DEBUG,
171 SectionKind::getMetadata());
174 Ctx->getMachOSection("__DWARF", "__debug_abbrev",
175 MCSectionMachO::S_ATTR_DEBUG,
176 SectionKind::getMetadata());
178 Ctx->getMachOSection("__DWARF", "__debug_info",
179 MCSectionMachO::S_ATTR_DEBUG,
180 SectionKind::getMetadata());
182 Ctx->getMachOSection("__DWARF", "__debug_line",
183 MCSectionMachO::S_ATTR_DEBUG,
184 SectionKind::getMetadata());
186 Ctx->getMachOSection("__DWARF", "__debug_frame",
187 MCSectionMachO::S_ATTR_DEBUG,
188 SectionKind::getMetadata());
189 DwarfPubTypesSection =
190 Ctx->getMachOSection("__DWARF", "__debug_pubtypes",
191 MCSectionMachO::S_ATTR_DEBUG,
192 SectionKind::getMetadata());
194 Ctx->getMachOSection("__DWARF", "__debug_str",
195 MCSectionMachO::S_ATTR_DEBUG,
196 SectionKind::getMetadata());
198 Ctx->getMachOSection("__DWARF", "__debug_loc",
199 MCSectionMachO::S_ATTR_DEBUG,
200 SectionKind::getMetadata());
201 DwarfARangesSection =
202 Ctx->getMachOSection("__DWARF", "__debug_aranges",
203 MCSectionMachO::S_ATTR_DEBUG,
204 SectionKind::getMetadata());
206 Ctx->getMachOSection("__DWARF", "__debug_ranges",
207 MCSectionMachO::S_ATTR_DEBUG,
208 SectionKind::getMetadata());
209 DwarfMacroInfoSection =
210 Ctx->getMachOSection("__DWARF", "__debug_macinfo",
211 MCSectionMachO::S_ATTR_DEBUG,
212 SectionKind::getMetadata());
213 DwarfDebugInlineSection =
214 Ctx->getMachOSection("__DWARF", "__debug_inlined",
215 MCSectionMachO::S_ATTR_DEBUG,
216 SectionKind::getMetadata());
218 TLSExtraDataSection = TLSTLVSection;
221 void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) {
222 if (T.getArch() == Triple::x86) {
223 PersonalityEncoding = (RelocM == Reloc::PIC_)
224 ? dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4
225 : dwarf::DW_EH_PE_absptr;
226 LSDAEncoding = (RelocM == Reloc::PIC_)
227 ? dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4
228 : dwarf::DW_EH_PE_absptr;
229 FDEEncoding = FDECFIEncoding = (RelocM == Reloc::PIC_)
230 ? dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4
231 : dwarf::DW_EH_PE_absptr;
232 TTypeEncoding = (RelocM == Reloc::PIC_)
233 ? dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4
234 : dwarf::DW_EH_PE_absptr;
235 } else if (T.getArch() == Triple::x86_64) {
236 FDECFIEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4;
238 if (RelocM == Reloc::PIC_) {
239 PersonalityEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel |
240 ((CMModel == CodeModel::Small || CMModel == CodeModel::Medium)
241 ? dwarf::DW_EH_PE_sdata4 : dwarf::DW_EH_PE_sdata8);
242 LSDAEncoding = dwarf::DW_EH_PE_pcrel |
243 (CMModel == CodeModel::Small
244 ? dwarf::DW_EH_PE_sdata4 : dwarf::DW_EH_PE_sdata8);
245 FDEEncoding = dwarf::DW_EH_PE_pcrel | dwarf::DW_EH_PE_sdata4;
246 TTypeEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel |
247 ((CMModel == CodeModel::Small || CMModel == CodeModel::Medium)
248 ? dwarf::DW_EH_PE_sdata4 : dwarf::DW_EH_PE_sdata8);
250 PersonalityEncoding =
251 (CMModel == CodeModel::Small || CMModel == CodeModel::Medium)
252 ? dwarf::DW_EH_PE_udata4 : dwarf::DW_EH_PE_absptr;
253 LSDAEncoding = (CMModel == CodeModel::Small)
254 ? dwarf::DW_EH_PE_udata4 : dwarf::DW_EH_PE_absptr;
255 FDEEncoding = dwarf::DW_EH_PE_udata4;
256 TTypeEncoding = (CMModel == CodeModel::Small)
257 ? dwarf::DW_EH_PE_udata4 : dwarf::DW_EH_PE_absptr;
263 Ctx->getELFSection(".bss", ELF::SHT_NOBITS,
264 ELF::SHF_WRITE |ELF::SHF_ALLOC,
265 SectionKind::getBSS());
268 Ctx->getELFSection(".text", ELF::SHT_PROGBITS,
271 SectionKind::getText());
274 Ctx->getELFSection(".data", ELF::SHT_PROGBITS,
275 ELF::SHF_WRITE |ELF::SHF_ALLOC,
276 SectionKind::getDataRel());
279 Ctx->getELFSection(".rodata", ELF::SHT_PROGBITS,
281 SectionKind::getReadOnly());
284 Ctx->getELFSection(".tdata", ELF::SHT_PROGBITS,
285 ELF::SHF_ALLOC | ELF::SHF_TLS |
287 SectionKind::getThreadData());
290 Ctx->getELFSection(".tbss", ELF::SHT_NOBITS,
291 ELF::SHF_ALLOC | ELF::SHF_TLS |
293 SectionKind::getThreadBSS());
296 Ctx->getELFSection(".data.rel", ELF::SHT_PROGBITS,
297 ELF::SHF_ALLOC |ELF::SHF_WRITE,
298 SectionKind::getDataRel());
300 DataRelLocalSection =
301 Ctx->getELFSection(".data.rel.local", ELF::SHT_PROGBITS,
302 ELF::SHF_ALLOC |ELF::SHF_WRITE,
303 SectionKind::getDataRelLocal());
306 Ctx->getELFSection(".data.rel.ro", ELF::SHT_PROGBITS,
307 ELF::SHF_ALLOC |ELF::SHF_WRITE,
308 SectionKind::getReadOnlyWithRel());
310 DataRelROLocalSection =
311 Ctx->getELFSection(".data.rel.ro.local", ELF::SHT_PROGBITS,
312 ELF::SHF_ALLOC |ELF::SHF_WRITE,
313 SectionKind::getReadOnlyWithRelLocal());
315 MergeableConst4Section =
316 Ctx->getELFSection(".rodata.cst4", ELF::SHT_PROGBITS,
317 ELF::SHF_ALLOC |ELF::SHF_MERGE,
318 SectionKind::getMergeableConst4());
320 MergeableConst8Section =
321 Ctx->getELFSection(".rodata.cst8", ELF::SHT_PROGBITS,
322 ELF::SHF_ALLOC |ELF::SHF_MERGE,
323 SectionKind::getMergeableConst8());
325 MergeableConst16Section =
326 Ctx->getELFSection(".rodata.cst16", ELF::SHT_PROGBITS,
327 ELF::SHF_ALLOC |ELF::SHF_MERGE,
328 SectionKind::getMergeableConst16());
331 Ctx->getELFSection(".ctors", ELF::SHT_PROGBITS,
332 ELF::SHF_ALLOC |ELF::SHF_WRITE,
333 SectionKind::getDataRel());
336 Ctx->getELFSection(".dtors", ELF::SHT_PROGBITS,
337 ELF::SHF_ALLOC |ELF::SHF_WRITE,
338 SectionKind::getDataRel());
340 // Exception Handling Sections.
342 // FIXME: We're emitting LSDA info into a readonly section on ELF, even though
343 // it contains relocatable pointers. In PIC mode, this is probably a big
344 // runtime hit for C++ apps. Either the contents of the LSDA need to be
345 // adjusted or this should be a data section.
347 Ctx->getELFSection(".gcc_except_table", ELF::SHT_PROGBITS,
349 SectionKind::getReadOnly());
351 // Debug Info Sections.
353 Ctx->getELFSection(".debug_abbrev", ELF::SHT_PROGBITS, 0,
354 SectionKind::getMetadata());
356 Ctx->getELFSection(".debug_info", ELF::SHT_PROGBITS, 0,
357 SectionKind::getMetadata());
359 Ctx->getELFSection(".debug_line", ELF::SHT_PROGBITS, 0,
360 SectionKind::getMetadata());
362 Ctx->getELFSection(".debug_frame", ELF::SHT_PROGBITS, 0,
363 SectionKind::getMetadata());
364 DwarfPubTypesSection =
365 Ctx->getELFSection(".debug_pubtypes", ELF::SHT_PROGBITS, 0,
366 SectionKind::getMetadata());
368 Ctx->getELFSection(".debug_str", ELF::SHT_PROGBITS,
369 ELF::SHF_MERGE | ELF::SHF_STRINGS,
370 SectionKind::getMergeable1ByteCString());
372 Ctx->getELFSection(".debug_loc", ELF::SHT_PROGBITS, 0,
373 SectionKind::getMetadata());
374 DwarfARangesSection =
375 Ctx->getELFSection(".debug_aranges", ELF::SHT_PROGBITS, 0,
376 SectionKind::getMetadata());
378 Ctx->getELFSection(".debug_ranges", ELF::SHT_PROGBITS, 0,
379 SectionKind::getMetadata());
380 DwarfMacroInfoSection =
381 Ctx->getELFSection(".debug_macinfo", ELF::SHT_PROGBITS, 0,
382 SectionKind::getMetadata());
386 void MCObjectFileInfo::InitCOFFMCObjectFileInfo(Triple T) {
389 Ctx->getCOFFSection(".text",
390 COFF::IMAGE_SCN_CNT_CODE |
391 COFF::IMAGE_SCN_MEM_EXECUTE |
392 COFF::IMAGE_SCN_MEM_READ,
393 SectionKind::getText());
395 Ctx->getCOFFSection(".data",
396 COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
397 COFF::IMAGE_SCN_MEM_READ |
398 COFF::IMAGE_SCN_MEM_WRITE,
399 SectionKind::getDataRel());
401 Ctx->getCOFFSection(".rdata",
402 COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
403 COFF::IMAGE_SCN_MEM_READ,
404 SectionKind::getReadOnly());
406 Ctx->getCOFFSection(".ctors",
407 COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
408 COFF::IMAGE_SCN_MEM_READ |
409 COFF::IMAGE_SCN_MEM_WRITE,
410 SectionKind::getDataRel());
412 Ctx->getCOFFSection(".dtors",
413 COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
414 COFF::IMAGE_SCN_MEM_READ |
415 COFF::IMAGE_SCN_MEM_WRITE,
416 SectionKind::getDataRel());
418 // FIXME: We're emitting LSDA info into a readonly section on COFF, even
419 // though it contains relocatable pointers. In PIC mode, this is probably a
420 // big runtime hit for C++ apps. Either the contents of the LSDA need to be
421 // adjusted or this should be a data section.
423 Ctx->getCOFFSection(".gcc_except_table",
424 COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
425 COFF::IMAGE_SCN_MEM_READ,
426 SectionKind::getReadOnly());
430 Ctx->getCOFFSection(".debug_abbrev",
431 COFF::IMAGE_SCN_MEM_DISCARDABLE |
432 COFF::IMAGE_SCN_MEM_READ,
433 SectionKind::getMetadata());
435 Ctx->getCOFFSection(".debug_info",
436 COFF::IMAGE_SCN_MEM_DISCARDABLE |
437 COFF::IMAGE_SCN_MEM_READ,
438 SectionKind::getMetadata());
440 Ctx->getCOFFSection(".debug_line",
441 COFF::IMAGE_SCN_MEM_DISCARDABLE |
442 COFF::IMAGE_SCN_MEM_READ,
443 SectionKind::getMetadata());
445 Ctx->getCOFFSection(".debug_frame",
446 COFF::IMAGE_SCN_MEM_DISCARDABLE |
447 COFF::IMAGE_SCN_MEM_READ,
448 SectionKind::getMetadata());
449 DwarfPubTypesSection =
450 Ctx->getCOFFSection(".debug_pubtypes",
451 COFF::IMAGE_SCN_MEM_DISCARDABLE |
452 COFF::IMAGE_SCN_MEM_READ,
453 SectionKind::getMetadata());
455 Ctx->getCOFFSection(".debug_str",
456 COFF::IMAGE_SCN_MEM_DISCARDABLE |
457 COFF::IMAGE_SCN_MEM_READ,
458 SectionKind::getMetadata());
460 Ctx->getCOFFSection(".debug_loc",
461 COFF::IMAGE_SCN_MEM_DISCARDABLE |
462 COFF::IMAGE_SCN_MEM_READ,
463 SectionKind::getMetadata());
464 DwarfARangesSection =
465 Ctx->getCOFFSection(".debug_aranges",
466 COFF::IMAGE_SCN_MEM_DISCARDABLE |
467 COFF::IMAGE_SCN_MEM_READ,
468 SectionKind::getMetadata());
470 Ctx->getCOFFSection(".debug_ranges",
471 COFF::IMAGE_SCN_MEM_DISCARDABLE |
472 COFF::IMAGE_SCN_MEM_READ,
473 SectionKind::getMetadata());
474 DwarfMacroInfoSection =
475 Ctx->getCOFFSection(".debug_macinfo",
476 COFF::IMAGE_SCN_MEM_DISCARDABLE |
477 COFF::IMAGE_SCN_MEM_READ,
478 SectionKind::getMetadata());
481 Ctx->getCOFFSection(".drectve",
482 COFF::IMAGE_SCN_LNK_INFO,
483 SectionKind::getMetadata());
486 Ctx->getCOFFSection(".pdata",
487 COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
488 COFF::IMAGE_SCN_MEM_READ |
489 COFF::IMAGE_SCN_MEM_WRITE,
490 SectionKind::getDataRel());
493 Ctx->getCOFFSection(".xdata",
494 COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
495 COFF::IMAGE_SCN_MEM_READ |
496 COFF::IMAGE_SCN_MEM_WRITE,
497 SectionKind::getDataRel());
500 void MCObjectFileInfo::InitMCObjectFileInfo(StringRef TT, Reloc::Model relocm,
508 CommDirectiveSupportsAlignment = true;
509 SupportsWeakOmittedEHFrame = true;
510 IsFunctionEHFrameSymbolPrivate = true;
512 PersonalityEncoding = LSDAEncoding = FDEEncoding = FDECFIEncoding =
513 TTypeEncoding = dwarf::DW_EH_PE_absptr;
515 EHFrameSection = 0; // Created on demand.
516 CompactUnwindSection = 0; // Used only by selected targets.
517 DwarfAccelNamesSection = 0; // Used only by selected targets.
518 DwarfAccelObjCSection = 0; // Used only by selected targets.
519 DwarfAccelNamespaceSection = 0; // Used only by selected targets.
520 DwarfAccelTypesSection = 0; // Used only by selected targets.
523 Triple::ArchType Arch = T.getArch();
524 // FIXME: Checking for Arch here to filter out bogus triples such as
525 // cellspu-apple-darwin. Perhaps we should fix in Triple?
526 if ((Arch == Triple::x86 || Arch == Triple::x86_64 ||
527 Arch == Triple::arm || Arch == Triple::thumb ||
528 Arch == Triple::ppc || Arch == Triple::ppc64 ||
529 Arch == Triple::UnknownArch) &&
530 (T.isOSDarwin() || T.getEnvironment() == Triple::MachO)) {
532 InitMachOMCObjectFileInfo(T);
533 } else if ((Arch == Triple::x86 || Arch == Triple::x86_64) &&
534 (T.getOS() == Triple::MinGW32 || T.getOS() == Triple::Cygwin ||
535 T.getOS() == Triple::Win32)) {
537 InitCOFFMCObjectFileInfo(T);
540 InitELFMCObjectFileInfo(T);
544 void MCObjectFileInfo::InitEHFrameSection() {
547 Ctx->getMachOSection("__TEXT", "__eh_frame",
548 MCSectionMachO::S_COALESCED |
549 MCSectionMachO::S_ATTR_NO_TOC |
550 MCSectionMachO::S_ATTR_STRIP_STATIC_SYMS |
551 MCSectionMachO::S_ATTR_LIVE_SUPPORT,
552 SectionKind::getReadOnly());
553 else if (Env == IsELF)
555 Ctx->getELFSection(".eh_frame", ELF::SHT_PROGBITS,
557 SectionKind::getDataRel());
560 Ctx->getCOFFSection(".eh_frame",
561 COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
562 COFF::IMAGE_SCN_MEM_READ |
563 COFF::IMAGE_SCN_MEM_WRITE,
564 SectionKind::getDataRel());