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 MachOModInitFuncSectionName; 28 extern StringRef MachOObjCCatListSectionName; 29 extern StringRef MachOObjCCatList2SectionName; 30 extern StringRef MachOObjCClassListSectionName; 31 extern StringRef MachOObjCClassNameSectionName; 32 extern StringRef MachOObjCClassRefsSectionName; 33 extern StringRef MachOObjCConstSectionName; 34 extern StringRef MachOObjCDataSectionName; 35 extern StringRef MachOObjCImageInfoSectionName; 36 extern StringRef MachOObjCMethNameSectionName; 37 extern StringRef MachOObjCMethTypeSectionName; 38 extern StringRef MachOObjCNLCatListSectionName; 39 extern StringRef MachOObjCSelRefsSectionName; 40 extern StringRef MachOSwift5ProtoSectionName; 41 extern StringRef MachOSwift5ProtosSectionName; 42 extern StringRef MachOSwift5TypesSectionName; 43 extern StringRef MachOSwift5TypeRefSectionName; 44 extern StringRef MachOSwift5FieldMetadataSectionName; 45 extern StringRef MachOSwift5EntrySectionName; 46 extern StringRef MachOThreadBSSSectionName; 47 extern StringRef MachOThreadDataSectionName; 48 extern StringRef MachOThreadVarsSectionName; 49 50 extern StringRef MachOInitSectionNames[19]; 51 52 // ELF section names. 53 extern StringRef ELFEHFrameSectionName; 54 extern StringRef ELFInitArrayFuncSectionName; 55 56 extern StringRef ELFThreadBSSSectionName; 57 extern StringRef ELFThreadDataSectionName; 58 59 bool isMachOInitializerSection(StringRef SegName, StringRef SecName); 60 bool isMachOInitializerSection(StringRef QualifiedName); 61 62 bool isELFInitializerSection(StringRef SecName); 63 64 bool isCOFFInitializerSection(StringRef Name); 65 66 } // end namespace orc 67 } // end namespace llvm 68 69 #endif // LLVM_EXECUTIONENGINE_ORC_SHARED_MEMORYFLAGS_H 70