1//===------ ObjectFormats.h - Object format details for ORC -----*- C++ -*-===//
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//
9// ORC-specific object format details.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_EXECUTIONENGINE_ORC_SHARED_OBJECTFORMATS_H
14#define LLVM_EXECUTIONENGINE_ORC_SHARED_OBJECTFORMATS_H
15
16#include "llvm/ADT/StringRef.h"
17
18namespace llvm {
19namespace orc {
20
21// MachO section names.
22
23extern StringRef MachODataCommonSectionName;
24extern StringRef MachODataDataSectionName;
25extern StringRef MachOEHFrameSectionName;
26extern StringRef MachOCompactUnwindInfoSectionName;
27extern StringRef MachOCStringSectionName;
28extern StringRef MachOModInitFuncSectionName;
29extern StringRef MachOObjCCatListSectionName;
30extern StringRef MachOObjCCatList2SectionName;
31extern StringRef MachOObjCClassListSectionName;
32extern StringRef MachOObjCClassNameSectionName;
33extern StringRef MachOObjCClassRefsSectionName;
34extern StringRef MachOObjCConstSectionName;
35extern StringRef MachOObjCDataSectionName;
36extern StringRef MachOObjCImageInfoSectionName;
37extern StringRef MachOObjCMethNameSectionName;
38extern StringRef MachOObjCMethTypeSectionName;
39extern StringRef MachOObjCNLCatListSectionName;
40extern StringRef MachOObjCSelRefsSectionName;
41extern StringRef MachOSwift5ProtoSectionName;
42extern StringRef MachOSwift5ProtosSectionName;
43extern StringRef MachOSwift5TypesSectionName;
44extern StringRef MachOSwift5TypeRefSectionName;
45extern StringRef MachOSwift5FieldMetadataSectionName;
46extern StringRef MachOSwift5EntrySectionName;
47extern StringRef MachOThreadBSSSectionName;
48extern StringRef MachOThreadDataSectionName;
49extern StringRef MachOThreadVarsSectionName;
50
51extern StringRef MachOInitSectionNames[19];
52
53// ELF section names.
54extern StringRef ELFEHFrameSectionName;
55
56extern StringRef ELFInitArrayFuncSectionName;
57extern StringRef ELFInitFuncSectionName;
58extern StringRef ELFFiniArrayFuncSectionName;
59extern StringRef ELFFiniFuncSectionName;
60extern StringRef ELFCtorArrayFuncSectionName;
61extern StringRef ELFDtorArrayFuncSectionName;
62
63extern StringRef ELFInitSectionNames[3];
64
65extern StringRef ELFThreadBSSSectionName;
66extern StringRef ELFThreadDataSectionName;
67
68bool isMachOInitializerSection(StringRef SegName, StringRef SecName);
69bool isMachOInitializerSection(StringRef QualifiedName);
70
71bool isELFInitializerSection(StringRef SecName);
72
73bool isCOFFInitializerSection(StringRef Name);
74
75} // end namespace orc
76} // end namespace llvm
77
78#endif // LLVM_EXECUTIONENGINE_ORC_SHARED_MEMORYFLAGS_H
79

source code of llvm/include/llvm/ExecutionEngine/Orc/Shared/ObjectFormats.h