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