LLVM 19.0.0git
GOFF.h
Go to the documentation of this file.
1//===-- llvm/BinaryFormat/GOFF.h - GOFF definitions --------------*- 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// This header contains common, non-processor-specific data structures and
10// constants for the GOFF file format.
11//
12// GOFF specifics can be found in MVS Program Management: Advanced Facilities.
13// See
14// https://www.ibm.com/docs/en/zos/3.1.0?topic=facilities-generalized-object-file-format-goff
15//
16//===----------------------------------------------------------------------===//
17
18#ifndef LLVM_BINARYFORMAT_GOFF_H
19#define LLVM_BINARYFORMAT_GOFF_H
20
22
23namespace llvm {
24
25namespace GOFF {
26
27/// \brief Length of the parts of a physical GOFF record.
28constexpr uint8_t RecordLength = 80;
29constexpr uint8_t RecordPrefixLength = 3;
30constexpr uint8_t PayloadLength = 77;
32
33/// \brief Maximum data length before starting a new card for RLD and TXT data.
34///
35/// The maximum number of bytes that can be included in an RLD or TXT record and
36/// their continuations is a SIGNED 16 bit int despite what the spec says. The
37/// number of bytes we allow ourselves to attach to a card is thus arbitrarily
38/// limited to 32K-1 bytes.
39constexpr uint16_t MaxDataLength = 32 * 1024 - 1;
40
41/// \brief Prefix byte on every record. This indicates GOFF format.
42constexpr uint8_t PTVPrefix = 0x03;
43
44enum RecordType : uint8_t {
45 RT_ESD = 0,
46 RT_TXT = 1,
47 RT_RLD = 2,
48 RT_LEN = 3,
49 RT_END = 4,
50 RT_HDR = 15,
51};
52
53enum ESDSymbolType : uint8_t {
59};
60
61enum ESDNameSpaceId : uint8_t {
65 ESD_NS_Parts = 3
66};
67
68enum ESDReserveQwords : uint8_t {
72 ESD_RQ_3 = 3
73};
74
75enum ESDAmode : uint8_t {
82};
83
84enum ESDRmode : uint8_t {
89};
90
91enum ESDTextStyle : uint8_t {
95};
96
97enum ESDBindingAlgorithm : uint8_t {
100};
101
102enum ESDTaskingBehavior : uint8_t {
107};
108
109enum ESDExecutable : uint8_t {
113};
114
120};
121
122enum ESDBindingStrength : uint8_t {
125};
126
127enum ESDLoadingBehavior : uint8_t {
132};
133
134enum ESDBindingScope : uint8_t {
140};
141
142enum ESDLinkageType : uint8_t { ESD_LT_OS = 0, ESD_LT_XPLink = 1 };
143
144enum ESDAlignment : uint8_t {
158};
159
160enum ENDEntryPointRequest : uint8_t {
165};
166
167// \brief Subsections of the primary C_CODE section in the object file.
168enum SubsectionKind : uint8_t {
171};
172} // end namespace GOFF
173
174} // end namespace llvm
175
176#endif // LLVM_BINARYFORMAT_GOFF_H
ESDLoadingBehavior
Definition: GOFF.h:127
@ ESD_LB_Deferred
Definition: GOFF.h:129
@ ESD_LB_NoLoad
Definition: GOFF.h:130
@ ESD_LB_Initial
Definition: GOFF.h:128
@ ESD_LB_Reserved
Definition: GOFF.h:131
RecordType
Definition: GOFF.h:44
@ RT_RLD
Definition: GOFF.h:47
@ RT_TXT
Definition: GOFF.h:46
@ RT_ESD
Definition: GOFF.h:45
@ RT_LEN
Definition: GOFF.h:48
@ RT_HDR
Definition: GOFF.h:50
@ RT_END
Definition: GOFF.h:49
ESDBindingAlgorithm
Definition: GOFF.h:97
@ ESD_BA_Concatenate
Definition: GOFF.h:98
@ ESD_BA_Merge
Definition: GOFF.h:99
ESDDuplicateSymbolSeverity
Definition: GOFF.h:115
@ ESD_DSS_NoWarning
Definition: GOFF.h:116
@ ESD_DSS_Warning
Definition: GOFF.h:117
@ ESD_DSS_Error
Definition: GOFF.h:118
@ ESD_DSS_Reserved
Definition: GOFF.h:119
constexpr uint8_t RecordPrefixLength
Definition: GOFF.h:29
constexpr uint8_t PayloadLength
Definition: GOFF.h:30
ESDTextStyle
Definition: GOFF.h:91
@ ESD_TS_Unstructured
Definition: GOFF.h:94
@ ESD_TS_Structured
Definition: GOFF.h:93
@ ESD_TS_ByteOriented
Definition: GOFF.h:92
ESDExecutable
Definition: GOFF.h:109
@ ESD_EXE_Unspecified
Definition: GOFF.h:110
@ ESD_EXE_CODE
Definition: GOFF.h:112
@ ESD_EXE_DATA
Definition: GOFF.h:111
constexpr uint8_t RecordContentLength
Definition: GOFF.h:31
ESDReserveQwords
Definition: GOFF.h:68
@ ESD_RQ_3
Definition: GOFF.h:72
@ ESD_RQ_1
Definition: GOFF.h:70
@ ESD_RQ_0
Definition: GOFF.h:69
@ ESD_RQ_2
Definition: GOFF.h:71
constexpr uint16_t MaxDataLength
Maximum data length before starting a new card for RLD and TXT data.
Definition: GOFF.h:39
ENDEntryPointRequest
Definition: GOFF.h:160
@ END_EPR_EsdidOffset
Definition: GOFF.h:162
@ END_EPR_ExternalName
Definition: GOFF.h:163
@ END_EPR_Reserved
Definition: GOFF.h:164
@ END_EPR_None
Definition: GOFF.h:161
ESDAlignment
Definition: GOFF.h:144
@ ESD_ALIGN_Doubleword
Definition: GOFF.h:148
@ ESD_ALIGN_512byte
Definition: GOFF.h:154
@ ESD_ALIGN_1024byte
Definition: GOFF.h:155
@ ESD_ALIGN_Quadword
Definition: GOFF.h:149
@ ESD_ALIGN_2Kpage
Definition: GOFF.h:156
@ ESD_ALIGN_256byte
Definition: GOFF.h:153
@ ESD_ALIGN_32byte
Definition: GOFF.h:150
@ ESD_ALIGN_128byte
Definition: GOFF.h:152
@ ESD_ALIGN_64byte
Definition: GOFF.h:151
@ ESD_ALIGN_Byte
Definition: GOFF.h:145
@ ESD_ALIGN_Fullword
Definition: GOFF.h:147
@ ESD_ALIGN_4Kpage
Definition: GOFF.h:157
@ ESD_ALIGN_Halfword
Definition: GOFF.h:146
ESDAmode
Definition: GOFF.h:75
@ ESD_AMODE_MIN
Definition: GOFF.h:81
@ ESD_AMODE_None
Definition: GOFF.h:76
@ ESD_AMODE_31
Definition: GOFF.h:78
@ ESD_AMODE_24
Definition: GOFF.h:77
@ ESD_AMODE_ANY
Definition: GOFF.h:79
@ ESD_AMODE_64
Definition: GOFF.h:80
ESDBindingScope
Definition: GOFF.h:134
@ ESD_BSC_Library
Definition: GOFF.h:138
@ ESD_BSC_Module
Definition: GOFF.h:137
@ ESD_BSC_Unspecified
Definition: GOFF.h:135
@ ESD_BSC_ImportExport
Definition: GOFF.h:139
@ ESD_BSC_Section
Definition: GOFF.h:136
constexpr uint8_t PTVPrefix
Prefix byte on every record. This indicates GOFF format.
Definition: GOFF.h:42
ESDLinkageType
Definition: GOFF.h:142
@ ESD_LT_OS
Definition: GOFF.h:142
@ ESD_LT_XPLink
Definition: GOFF.h:142
constexpr uint8_t RecordLength
Length of the parts of a physical GOFF record.
Definition: GOFF.h:28
SubsectionKind
Definition: GOFF.h:168
@ SK_PPA1
Definition: GOFF.h:169
@ SK_PPA2
Definition: GOFF.h:170
ESDNameSpaceId
Definition: GOFF.h:61
@ ESD_NS_Parts
Definition: GOFF.h:65
@ ESD_NS_ProgramManagementBinder
Definition: GOFF.h:62
@ ESD_NS_NormalName
Definition: GOFF.h:63
@ ESD_NS_PseudoRegister
Definition: GOFF.h:64
ESDSymbolType
Definition: GOFF.h:53
@ ESD_ST_PartReference
Definition: GOFF.h:57
@ ESD_ST_ElementDefinition
Definition: GOFF.h:55
@ ESD_ST_LabelDefinition
Definition: GOFF.h:56
@ ESD_ST_SectionDefinition
Definition: GOFF.h:54
@ ESD_ST_ExternalReference
Definition: GOFF.h:58
ESDTaskingBehavior
Definition: GOFF.h:102
@ ESD_TA_Reus
Definition: GOFF.h:105
@ ESD_TA_Unspecified
Definition: GOFF.h:103
@ ESD_TA_NonReus
Definition: GOFF.h:104
@ ESD_TA_Rent
Definition: GOFF.h:106
ESDBindingStrength
Definition: GOFF.h:122
@ ESD_BST_Strong
Definition: GOFF.h:123
@ ESD_BST_Weak
Definition: GOFF.h:124
ESDRmode
Definition: GOFF.h:84
@ ESD_RMODE_31
Definition: GOFF.h:87
@ ESD_RMODE_None
Definition: GOFF.h:85
@ ESD_RMODE_64
Definition: GOFF.h:88
@ ESD_RMODE_24
Definition: GOFF.h:86
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18