LLVM 20.0.0git
XCOFFYAML.cpp
Go to the documentation of this file.
1//===-- XCOFFYAML.cpp - XCOFF YAMLIO implementation -------------*- 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 file defines classes for handling the YAML representation of XCOFF.
10//
11//===----------------------------------------------------------------------===//
12
15#include <string.h>
16
17namespace llvm {
18namespace XCOFFYAML {
19
20Object::Object() { memset(&Header, 0, sizeof(Header)); }
21
23
24} // namespace XCOFFYAML
25
26namespace yaml {
27
28void ScalarBitSetTraits<XCOFF::SectionTypeFlags>::bitset(
30#define ECase(X) IO.bitSetCase(Value, #X, XCOFF::X)
44#undef ECase
45}
46
47void ScalarEnumerationTraits<XCOFF::DwarfSectionSubtypeFlags>::enumeration(
49#define ECase(X) IO.enumCase(Value, #X, XCOFF::X)
61#undef ECase
62 IO.enumFallback<Hex32>(Value);
63}
64
65void ScalarEnumerationTraits<XCOFF::StorageClass>::enumeration(
66 IO &IO, XCOFF::StorageClass &Value) {
67#define ECase(X) IO.enumCase(Value, #X, XCOFF::X)
70 ECase(C_EXT);
72 ECase(C_REG);
76 ECase(C_MOS);
77 ECase(C_ARG);
79 ECase(C_MOU);
84 ECase(C_MOE);
88 ECase(C_FCN);
89 ECase(C_EOS);
100 ECase(C_GSYM);
101 ECase(C_LSYM);
102 ECase(C_PSYM);
103 ECase(C_RSYM);
104 ECase(C_RPSYM);
105 ECase(C_STSYM);
106 ECase(C_TCSYM);
107 ECase(C_BCOMM);
108 ECase(C_ECOML);
109 ECase(C_ECOMM);
110 ECase(C_DECL);
111 ECase(C_ENTRY);
112 ECase(C_FUN);
113 ECase(C_BSTAT);
114 ECase(C_ESTAT);
115 ECase(C_GTLS);
116 ECase(C_STTLS);
117 ECase(C_EFCN);
118#undef ECase
119}
120
121void ScalarEnumerationTraits<XCOFF::StorageMappingClass>::enumeration(
123#define ECase(X) IO.enumCase(Value, #X, XCOFF::X)
124 ECase(XMC_PR);
125 ECase(XMC_RO);
126 ECase(XMC_DB);
127 ECase(XMC_GL);
128 ECase(XMC_XO);
129 ECase(XMC_SV);
132 ECase(XMC_TI);
133 ECase(XMC_TB);
134 ECase(XMC_RW);
135 ECase(XMC_TC0);
136 ECase(XMC_TC);
137 ECase(XMC_TD);
138 ECase(XMC_DS);
139 ECase(XMC_UA);
140 ECase(XMC_BS);
141 ECase(XMC_UC);
142 ECase(XMC_TL);
143 ECase(XMC_UL);
144 ECase(XMC_TE);
145#undef ECase
146}
147
148void ScalarEnumerationTraits<XCOFF::SymbolType>::enumeration(
149 IO &IO, XCOFF::SymbolType &Value) {
150#define ECase(X) IO.enumCase(Value, #X, XCOFF::X)
151 ECase(XTY_ER);
152 ECase(XTY_SD);
153 ECase(XTY_LD);
154 ECase(XTY_CM);
155#undef ECase
156 IO.enumFallback<Hex8>(Value);
157}
158
159void ScalarEnumerationTraits<XCOFFYAML::AuxSymbolType>::enumeration(
161#define ECase(X) IO.enumCase(Type, #X, XCOFFYAML::X)
163 ECase(AUX_FCN);
164 ECase(AUX_SYM);
168 ECase(AUX_STAT);
169#undef ECase
170}
171
172void ScalarEnumerationTraits<XCOFF::CFileStringType>::enumeration(
173 IO &IO, XCOFF::CFileStringType &Type) {
174#define ECase(X) IO.enumCase(Type, #X, XCOFF::X)
175 ECase(XFT_FN);
176 ECase(XFT_CT);
177 ECase(XFT_CV);
178 ECase(XFT_CD);
179#undef ECase
180}
181
185
186 uint32_t denormalize(IO &) { return Flags; }
187
189};
190
192 IO &IO, XCOFFYAML::FileHeader &FileHdr) {
193 IO.mapOptional("MagicNumber", FileHdr.Magic);
194 IO.mapOptional("NumberOfSections", FileHdr.NumberOfSections);
195 IO.mapOptional("CreationTime", FileHdr.TimeStamp);
196 IO.mapOptional("OffsetToSymbolTable", FileHdr.SymbolTableOffset);
197 IO.mapOptional("EntriesInSymbolTable", FileHdr.NumberOfSymTableEntries);
198 IO.mapOptional("AuxiliaryHeaderSize", FileHdr.AuxHeaderSize);
199 IO.mapOptional("Flags", FileHdr.Flags);
200}
201
203 IO &IO, XCOFFYAML::AuxiliaryHeader &AuxHdr) {
204 IO.mapOptional("Magic", AuxHdr.Magic);
205 IO.mapOptional("Version", AuxHdr.Version);
206 IO.mapOptional("TextStartAddr", AuxHdr.TextStartAddr);
207 IO.mapOptional("DataStartAddr", AuxHdr.DataStartAddr);
208 IO.mapOptional("TOCAnchorAddr", AuxHdr.TOCAnchorAddr);
209 IO.mapOptional("TextSectionSize", AuxHdr.TextSize);
210 IO.mapOptional("DataSectionSize", AuxHdr.InitDataSize);
211 IO.mapOptional("BssSectionSize", AuxHdr.BssDataSize);
212 IO.mapOptional("SecNumOfEntryPoint", AuxHdr.SecNumOfEntryPoint);
213 IO.mapOptional("SecNumOfText", AuxHdr.SecNumOfText);
214 IO.mapOptional("SecNumOfData", AuxHdr.SecNumOfData);
215 IO.mapOptional("SecNumOfTOC", AuxHdr.SecNumOfTOC);
216 IO.mapOptional("SecNumOfLoader", AuxHdr.SecNumOfLoader);
217 IO.mapOptional("SecNumOfBSS", AuxHdr.SecNumOfBSS);
218 IO.mapOptional("MaxAlignOfText", AuxHdr.MaxAlignOfText);
219 IO.mapOptional("MaxAlignOfData", AuxHdr.MaxAlignOfData);
220 IO.mapOptional("ModuleType", AuxHdr.CpuFlag);
221 IO.mapOptional("TextPageSize", AuxHdr.TextPageSize);
222 IO.mapOptional("DataPageSize", AuxHdr.DataPageSize);
223 IO.mapOptional("StackPageSize", AuxHdr.StackPageSize);
224 IO.mapOptional("FlagAndTDataAlignment", AuxHdr.FlagAndTDataAlignment);
225 IO.mapOptional("EntryPointAddr", AuxHdr.EntryPointAddr);
226 IO.mapOptional("MaxStackSize", AuxHdr.MaxStackSize);
227 IO.mapOptional("MaxDataSize", AuxHdr.MaxDataSize);
228 IO.mapOptional("SecNumOfTData", AuxHdr.SecNumOfTData);
229 IO.mapOptional("SecNumOfTBSS", AuxHdr.SecNumOfTBSS);
230 IO.mapOptional("Flag", AuxHdr.Flag);
231}
232
235 IO.mapOptional("Address", R.VirtualAddress);
236 IO.mapOptional("Symbol", R.SymbolIndex);
237 IO.mapOptional("Info", R.Info);
238 IO.mapOptional("Type", R.Type);
239}
240
242 XCOFFYAML::Section &Sec) {
243 MappingNormalization<NSectionFlags, uint32_t> NC(IO, Sec.Flags);
244 IO.mapOptional("Name", Sec.SectionName);
245 IO.mapOptional("Address", Sec.Address);
246 IO.mapOptional("Size", Sec.Size);
247 IO.mapOptional("FileOffsetToData", Sec.FileOffsetToData);
248 IO.mapOptional("FileOffsetToRelocations", Sec.FileOffsetToRelocations);
249 IO.mapOptional("FileOffsetToLineNumbers", Sec.FileOffsetToLineNumbers);
250 IO.mapOptional("NumberOfRelocations", Sec.NumberOfRelocations);
251 IO.mapOptional("NumberOfLineNumbers", Sec.NumberOfLineNumbers);
252 IO.mapOptional("Flags", NC->Flags);
253 IO.mapOptional("DWARFSectionSubtype", Sec.SectionSubtype);
254 IO.mapOptional("SectionData", Sec.SectionData);
255 IO.mapOptional("Relocations", Sec.Relocations);
256}
257
258static void auxSymMapping(IO &IO, XCOFFYAML::CsectAuxEnt &AuxSym, bool Is64) {
259 IO.mapOptional("ParameterHashIndex", AuxSym.ParameterHashIndex);
260 IO.mapOptional("TypeChkSectNum", AuxSym.TypeChkSectNum);
261 IO.mapOptional("SymbolAlignmentAndType", AuxSym.SymbolAlignmentAndType);
262 IO.mapOptional("SymbolType", AuxSym.SymbolType);
263 IO.mapOptional("SymbolAlignment", AuxSym.SymbolAlignment);
264 IO.mapOptional("StorageMappingClass", AuxSym.StorageMappingClass);
265 if (Is64) {
266 IO.mapOptional("SectionOrLengthLo", AuxSym.SectionOrLengthLo);
267 IO.mapOptional("SectionOrLengthHi", AuxSym.SectionOrLengthHi);
268 } else {
269 IO.mapOptional("SectionOrLength", AuxSym.SectionOrLength);
270 IO.mapOptional("StabInfoIndex", AuxSym.StabInfoIndex);
271 IO.mapOptional("StabSectNum", AuxSym.StabSectNum);
272 }
273}
274
275static void auxSymMapping(IO &IO, XCOFFYAML::FileAuxEnt &AuxSym) {
276 IO.mapOptional("FileNameOrString", AuxSym.FileNameOrString);
277 IO.mapOptional("FileStringType", AuxSym.FileStringType);
278}
279
280static void auxSymMapping(IO &IO, XCOFFYAML::BlockAuxEnt &AuxSym, bool Is64) {
281 if (Is64) {
282 IO.mapOptional("LineNum", AuxSym.LineNum);
283 } else {
284 IO.mapOptional("LineNumHi", AuxSym.LineNumHi);
285 IO.mapOptional("LineNumLo", AuxSym.LineNumLo);
286 }
287}
288
289static void auxSymMapping(IO &IO, XCOFFYAML::FunctionAuxEnt &AuxSym,
290 bool Is64) {
291 if (!Is64)
292 IO.mapOptional("OffsetToExceptionTbl", AuxSym.OffsetToExceptionTbl);
293 IO.mapOptional("SizeOfFunction", AuxSym.SizeOfFunction);
294 IO.mapOptional("SymIdxOfNextBeyond", AuxSym.SymIdxOfNextBeyond);
295 IO.mapOptional("PtrToLineNum", AuxSym.PtrToLineNum);
296}
297
298static void auxSymMapping(IO &IO, XCOFFYAML::ExcpetionAuxEnt &AuxSym) {
299 IO.mapOptional("OffsetToExceptionTbl", AuxSym.OffsetToExceptionTbl);
300 IO.mapOptional("SizeOfFunction", AuxSym.SizeOfFunction);
301 IO.mapOptional("SymIdxOfNextBeyond", AuxSym.SymIdxOfNextBeyond);
302}
303
304static void auxSymMapping(IO &IO, XCOFFYAML::SectAuxEntForDWARF &AuxSym) {
305 IO.mapOptional("LengthOfSectionPortion", AuxSym.LengthOfSectionPortion);
306 IO.mapOptional("NumberOfRelocEnt", AuxSym.NumberOfRelocEnt);
307}
308
309static void auxSymMapping(IO &IO, XCOFFYAML::SectAuxEntForStat &AuxSym) {
310 IO.mapOptional("SectionLength", AuxSym.SectionLength);
311 IO.mapOptional("NumberOfRelocEnt", AuxSym.NumberOfRelocEnt);
312 IO.mapOptional("NumberOfLineNum", AuxSym.NumberOfLineNum);
313}
314
315template <typename AuxEntT>
316static void ResetAuxSym(IO &IO,
317 std::unique_ptr<XCOFFYAML::AuxSymbolEnt> &AuxSym) {
318 if (!IO.outputting())
319 AuxSym.reset(new AuxEntT);
320}
321
323 IO &IO, std::unique_ptr<XCOFFYAML::AuxSymbolEnt> &AuxSym) {
324 const bool Is64 =
325 static_cast<XCOFFYAML::Object *>(IO.getContext())->Header.Magic ==
326 (llvm::yaml::Hex16)XCOFF::XCOFF64;
327
329 if (IO.outputting())
330 AuxType = AuxSym->Type;
331 IO.mapRequired("Type", AuxType);
332 switch (AuxType) {
334 if (!Is64) {
335 IO.setError("an auxiliary symbol of type AUX_EXCEPT cannot be defined in "
336 "XCOFF32");
337 return;
338 }
339 ResetAuxSym<XCOFFYAML::ExcpetionAuxEnt>(IO, AuxSym);
340 auxSymMapping(IO, *cast<XCOFFYAML::ExcpetionAuxEnt>(AuxSym.get()));
341 break;
343 ResetAuxSym<XCOFFYAML::FunctionAuxEnt>(IO, AuxSym);
344 auxSymMapping(IO, *cast<XCOFFYAML::FunctionAuxEnt>(AuxSym.get()), Is64);
345 break;
347 ResetAuxSym<XCOFFYAML::BlockAuxEnt>(IO, AuxSym);
348 auxSymMapping(IO, *cast<XCOFFYAML::BlockAuxEnt>(AuxSym.get()), Is64);
349 break;
351 ResetAuxSym<XCOFFYAML::FileAuxEnt>(IO, AuxSym);
352 auxSymMapping(IO, *cast<XCOFFYAML::FileAuxEnt>(AuxSym.get()));
353 break;
355 ResetAuxSym<XCOFFYAML::CsectAuxEnt>(IO, AuxSym);
356 auxSymMapping(IO, *cast<XCOFFYAML::CsectAuxEnt>(AuxSym.get()), Is64);
357 break;
359 ResetAuxSym<XCOFFYAML::SectAuxEntForDWARF>(IO, AuxSym);
360 auxSymMapping(IO, *cast<XCOFFYAML::SectAuxEntForDWARF>(AuxSym.get()));
361 break;
363 if (Is64) {
364 IO.setError(
365 "an auxiliary symbol of type AUX_STAT cannot be defined in XCOFF64");
366 return;
367 }
368 ResetAuxSym<XCOFFYAML::SectAuxEntForStat>(IO, AuxSym);
369 auxSymMapping(IO, *cast<XCOFFYAML::SectAuxEntForStat>(AuxSym.get()));
370 break;
371 }
372}
373
375 IO.mapOptional("Name", S.SymbolName);
376 IO.mapOptional("Value", S.Value);
377 IO.mapOptional("Section", S.SectionName);
378 IO.mapOptional("SectionIndex", S.SectionIndex);
379 IO.mapOptional("Type", S.Type);
380 IO.mapOptional("StorageClass", S.StorageClass);
381 IO.mapOptional("NumberOfAuxEntries", S.NumberOfAuxEntries);
382 IO.mapOptional("AuxEntries", S.AuxEntries);
383}
384
386 IO &IO, XCOFFYAML::StringTable &Str) {
387 IO.mapOptional("ContentSize", Str.ContentSize);
388 IO.mapOptional("Length", Str.Length);
389 IO.mapOptional("Strings", Str.Strings);
390 IO.mapOptional("RawContent", Str.RawContent);
391}
392
394 IO.setContext(&Obj);
395 IO.mapTag("!XCOFF", true);
396 IO.mapRequired("FileHeader", Obj.Header);
397 IO.mapOptional("AuxiliaryHeader", Obj.AuxHeader);
398 IO.mapOptional("Sections", Obj.Sections);
399 IO.mapOptional("Symbols", Obj.Symbols);
400 IO.mapOptional("StringTable", Obj.StrTbl);
401 IO.setContext(nullptr);
402}
403
404} // namespace yaml
405} // namespace llvm
COFFYAML::AuxSymbolType AuxType
Definition: COFFYAML.cpp:353
#define ECase(X)
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
LLVM Value Representation.
Definition: Value.h:74
@ C
The default llvm calling convention, compatible with C.
Definition: CallingConv.h:34
DwarfSectionSubtypeFlags
Values for defining the section subtype of sections of type STYP_DWARF as they would appear in the (s...
Definition: XCOFF.h:154
@ SSUBTYP_DWARNGE
DWARF aranges section.
Definition: XCOFF.h:159
@ SSUBTYP_DWFRAME
DWARF frame section.
Definition: XCOFF.h:164
@ SSUBTYP_DWABREV
DWARF abbrev section.
Definition: XCOFF.h:160
@ SSUBTYP_DWINFO
DWARF info section.
Definition: XCOFF.h:155
@ SSUBTYP_DWRNGES
DWARF ranges section.
Definition: XCOFF.h:162
@ SSUBTYP_DWLOC
DWARF loc section.
Definition: XCOFF.h:163
@ SSUBTYP_DWMAC
DWARF macinfo section.
Definition: XCOFF.h:165
@ SSUBTYP_DWPBNMS
DWARF pubnames section.
Definition: XCOFF.h:157
@ SSUBTYP_DWPBTYP
DWARF pubtypes section.
Definition: XCOFF.h:158
@ SSUBTYP_DWLINE
DWARF line section.
Definition: XCOFF.h:156
@ SSUBTYP_DWSTR
DWARF str section.
Definition: XCOFF.h:161
@ AUX_SECT
Identifies a SECT auxiliary entry.
Definition: XCOFF.h:348
@ AUX_FILE
Identifies a file auxiliary entry.
Definition: XCOFF.h:346
@ AUX_EXCEPT
Identifies an exception auxiliary entry.
Definition: XCOFF.h:343
@ AUX_FCN
Identifies a function auxiliary entry.
Definition: XCOFF.h:344
@ AUX_SYM
Identifies a symbol auxiliary entry.
Definition: XCOFF.h:345
@ AUX_CSECT
Identifies a csect auxiliary entry.
Definition: XCOFF.h:347
CFileStringType
Definition: XCOFF.h:323
@ XFT_FN
Specifies the source-file name.
Definition: XCOFF.h:324
@ XFT_CD
Specifies compiler-defined information.
Definition: XCOFF.h:327
@ XFT_CV
Specifies the compiler version number.
Definition: XCOFF.h:326
@ XFT_CT
Specifies the compiler time stamp.
Definition: XCOFF.h:325
StorageClass
Definition: XCOFF.h:170
@ C_BCOMM
Definition: XCOFF.h:177
@ C_GTLS
Definition: XCOFF.h:182
@ C_LINE
Definition: XCOFF.h:228
@ C_DECL
Definition: XCOFF.h:208
@ C_PSYM
Definition: XCOFF.h:190
@ C_RPSYM
Definition: XCOFF.h:192
@ C_STRTAG
Definition: XCOFF.h:218
@ C_FIELD
Definition: XCOFF.h:226
@ C_GSYM
Definition: XCOFF.h:175
@ C_BINCL
Definition: XCOFF.h:173
@ C_UNTAG
Definition: XCOFF.h:220
@ C_AUTO
Definition: XCOFF.h:211
@ C_RSYM
Definition: XCOFF.h:191
@ C_EXTDEF
Definition: XCOFF.h:213
@ C_LABEL
Definition: XCOFF.h:214
@ C_BLOCK
Definition: XCOFF.h:204
@ C_STAT
Definition: XCOFF.h:203
@ C_INFO
Definition: XCOFF.h:207
@ C_ENTRY
Definition: XCOFF.h:179
@ C_STTLS
Definition: XCOFF.h:183
@ C_WEAKEXT
Definition: XCOFF.h:199
@ C_ENTAG
Definition: XCOFF.h:223
@ C_EINCL
Definition: XCOFF.h:174
@ C_LSYM
Definition: XCOFF.h:189
@ C_ALIAS
Definition: XCOFF.h:229
@ C_EFCN
Definition: XCOFF.h:231
@ C_ULABEL
Definition: XCOFF.h:215
@ C_FILE
Definition: XCOFF.h:172
@ C_NULL
Definition: XCOFF.h:202
@ C_STSYM
Definition: XCOFF.h:176
@ C_ECOML
Definition: XCOFF.h:193
@ C_DWARF
Definition: XCOFF.h:186
@ C_HIDDEN
Definition: XCOFF.h:230
@ C_REGPARM
Definition: XCOFF.h:225
@ C_TPDEF
Definition: XCOFF.h:221
@ C_USTATIC
Definition: XCOFF.h:222
@ C_HIDEXT
Definition: XCOFF.h:206
@ C_TCSYM
Definition: XCOFF.h:234
@ C_ECOMM
Definition: XCOFF.h:178
@ C_BSTAT
Definition: XCOFF.h:180
@ C_ESTAT
Definition: XCOFF.h:181
StorageMappingClass
Storage Mapping Class definitions.
Definition: XCOFF.h:103
@ XMC_TE
Symbol mapped at the end of TOC.
Definition: XCOFF.h:128
@ XMC_TB
Traceback Table csect.
Definition: XCOFF.h:114
@ XMC_TC0
TOC Anchor for TOC Addressability.
Definition: XCOFF.h:118
@ XMC_SV3264
Supervisor Call for both 32- and 64-bit processes.
Definition: XCOFF.h:112
@ XMC_GL
Global Linkage (Interfile Interface Code)
Definition: XCOFF.h:108
@ XMC_DS
Descriptor csect.
Definition: XCOFF.h:121
@ XMC_SV64
Supervisor Call for 64-bit process.
Definition: XCOFF.h:111
@ XMC_RW
Read Write Data.
Definition: XCOFF.h:117
@ XMC_TL
Initialized thread-local variable.
Definition: XCOFF.h:126
@ XMC_RO
Read Only Constant.
Definition: XCOFF.h:106
@ XMC_DB
Debug Dictionary Table.
Definition: XCOFF.h:107
@ XMC_UA
Unclassified - Treated as Read Write.
Definition: XCOFF.h:122
@ XMC_SV
Supervisor Call (32-bit process only)
Definition: XCOFF.h:110
@ XMC_TD
Scalar data item in the TOC.
Definition: XCOFF.h:120
@ XMC_UC
Un-named Fortran Common.
Definition: XCOFF.h:124
@ XMC_UL
Uninitialized thread-local variable.
Definition: XCOFF.h:127
@ XMC_TI
Traceback Index csect.
Definition: XCOFF.h:113
@ XMC_PR
Program Code.
Definition: XCOFF.h:105
@ XMC_XO
Extended Operation (Pseudo Machine Instruction)
Definition: XCOFF.h:109
@ XMC_BS
BSS class (uninitialized static internal)
Definition: XCOFF.h:123
@ XMC_TC
General TOC item.
Definition: XCOFF.h:119
@ XTY_CM
Common csect definition. For uninitialized storage.
Definition: XCOFF.h:245
@ XTY_SD
Csect definition for initialized storage.
Definition: XCOFF.h:242
@ XTY_LD
Label definition.
Definition: XCOFF.h:243
@ XTY_ER
External reference.
Definition: XCOFF.h:241
@ XCOFF64
Definition: XCOFF.h:48
SectionTypeFlags
Definition: XCOFF.h:134
@ STYP_TYPCHK
Definition: XCOFF.h:146
@ STYP_LOADER
Definition: XCOFF.h:144
@ STYP_DWARF
Definition: XCOFF.h:136
@ STYP_DATA
Definition: XCOFF.h:138
@ STYP_INFO
Definition: XCOFF.h:141
@ STYP_TDATA
Definition: XCOFF.h:142
@ STYP_TEXT
Definition: XCOFF.h:137
@ STYP_DEBUG
Definition: XCOFF.h:145
@ STYP_PAD
Definition: XCOFF.h:135
@ STYP_EXCEPT
Definition: XCOFF.h:140
@ STYP_OVRFLO
Definition: XCOFF.h:147
@ STYP_BSS
Definition: XCOFF.h:139
@ STYP_TBSS
Definition: XCOFF.h:143
static void auxSymMapping(IO &IO, XCOFFYAML::CsectAuxEnt &AuxSym, bool Is64)
Definition: XCOFFYAML.cpp:258
static void ResetAuxSym(IO &IO, std::unique_ptr< XCOFFYAML::AuxSymbolEnt > &AuxSym)
Definition: XCOFFYAML.cpp:316
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
#define NC
Definition: regutils.h:42
std::optional< llvm::yaml::Hex64 > BssDataSize
Definition: XCOFFYAML.h:56
std::optional< llvm::yaml::Hex8 > StackPageSize
Definition: XCOFFYAML.h:52
std::optional< llvm::yaml::Hex64 > TextSize
Definition: XCOFFYAML.h:54
std::optional< uint16_t > SecNumOfTOC
Definition: XCOFFYAML.h:42
std::optional< llvm::yaml::Hex8 > TextPageSize
Definition: XCOFFYAML.h:50
std::optional< uint16_t > SecNumOfEntryPoint
Definition: XCOFFYAML.h:39
std::optional< llvm::yaml::Hex64 > TextStartAddr
Definition: XCOFFYAML.h:36
std::optional< llvm::yaml::Hex64 > MaxDataSize
Definition: XCOFFYAML.h:59
std::optional< uint16_t > SecNumOfTData
Definition: XCOFFYAML.h:60
std::optional< llvm::yaml::Hex16 > MaxAlignOfData
Definition: XCOFFYAML.h:46
std::optional< uint16_t > SecNumOfTBSS
Definition: XCOFFYAML.h:61
std::optional< llvm::yaml::Hex16 > MaxAlignOfText
Definition: XCOFFYAML.h:45
std::optional< uint16_t > SecNumOfLoader
Definition: XCOFFYAML.h:43
std::optional< llvm::yaml::Hex64 > TOCAnchorAddr
Definition: XCOFFYAML.h:38
std::optional< llvm::yaml::Hex16 > Flag
Definition: XCOFFYAML.h:62
std::optional< llvm::yaml::Hex8 > DataPageSize
Definition: XCOFFYAML.h:51
std::optional< uint16_t > SecNumOfText
Definition: XCOFFYAML.h:40
std::optional< llvm::yaml::Hex16 > Magic
Definition: XCOFFYAML.h:34
std::optional< uint16_t > SecNumOfData
Definition: XCOFFYAML.h:41
std::optional< llvm::yaml::Hex64 > InitDataSize
Definition: XCOFFYAML.h:55
std::optional< llvm::yaml::Hex64 > MaxStackSize
Definition: XCOFFYAML.h:58
std::optional< llvm::yaml::Hex16 > Version
Definition: XCOFFYAML.h:35
std::optional< llvm::yaml::Hex64 > EntryPointAddr
Definition: XCOFFYAML.h:57
std::optional< llvm::yaml::Hex8 > CpuFlag
Definition: XCOFFYAML.h:48
std::optional< llvm::yaml::Hex8 > FlagAndTDataAlignment
Definition: XCOFFYAML.h:53
std::optional< uint16_t > SecNumOfBSS
Definition: XCOFFYAML.h:44
std::optional< llvm::yaml::Hex64 > DataStartAddr
Definition: XCOFFYAML.h:37
std::optional< uint32_t > LineNum
Definition: XCOFFYAML.h:165
std::optional< uint16_t > LineNumHi
Definition: XCOFFYAML.h:162
std::optional< uint16_t > LineNumLo
Definition: XCOFFYAML.h:163
std::optional< uint16_t > TypeChkSectNum
Definition: XCOFFYAML.h:124
std::optional< uint32_t > ParameterHashIndex
Definition: XCOFFYAML.h:123
std::optional< uint32_t > SectionOrLength
Definition: XCOFFYAML.h:116
std::optional< uint32_t > SectionOrLengthHi
Definition: XCOFFYAML.h:121
std::optional< uint8_t > SymbolAlignmentAndType
Definition: XCOFFYAML.h:128
std::optional< uint32_t > SectionOrLengthLo
Definition: XCOFFYAML.h:120
std::optional< uint8_t > SymbolAlignment
Definition: XCOFFYAML.h:126
std::optional< uint16_t > StabSectNum
Definition: XCOFFYAML.h:118
std::optional< XCOFF::StorageMappingClass > StorageMappingClass
Definition: XCOFFYAML.h:129
std::optional< uint32_t > StabInfoIndex
Definition: XCOFFYAML.h:117
std::optional< XCOFF::SymbolType > SymbolType
Definition: XCOFFYAML.h:125
std::optional< int32_t > SymIdxOfNextBeyond
Definition: XCOFFYAML.h:152
std::optional< uint32_t > SizeOfFunction
Definition: XCOFFYAML.h:151
std::optional< uint64_t > OffsetToExceptionTbl
Definition: XCOFFYAML.h:150
std::optional< XCOFF::CFileStringType > FileStringType
Definition: XCOFFYAML.h:106
std::optional< StringRef > FileNameOrString
Definition: XCOFFYAML.h:105
llvm::yaml::Hex16 Magic
Definition: XCOFFYAML.h:24
llvm::yaml::Hex16 Flags
Definition: XCOFFYAML.h:30
llvm::yaml::Hex64 SymbolTableOffset
Definition: XCOFFYAML.h:27
std::optional< int32_t > SymIdxOfNextBeyond
Definition: XCOFFYAML.h:141
std::optional< uint32_t > OffsetToExceptionTbl
Definition: XCOFFYAML.h:138
std::optional< uint64_t > PtrToLineNum
Definition: XCOFFYAML.h:139
std::optional< uint32_t > SizeOfFunction
Definition: XCOFFYAML.h:140
std::vector< Section > Sections
Definition: XCOFFYAML.h:216
std::optional< AuxiliaryHeader > AuxHeader
Definition: XCOFFYAML.h:215
std::vector< Symbol > Symbols
Definition: XCOFFYAML.h:217
std::optional< uint32_t > NumberOfRelocEnt
Definition: XCOFFYAML.h:175
std::optional< uint32_t > LengthOfSectionPortion
Definition: XCOFFYAML.h:174
std::optional< uint16_t > NumberOfRelocEnt
Definition: XCOFFYAML.h:185
std::optional< uint16_t > NumberOfLineNum
Definition: XCOFFYAML.h:186
std::optional< uint32_t > SectionLength
Definition: XCOFFYAML.h:184
llvm::yaml::Hex64 FileOffsetToRelocations
Definition: XCOFFYAML.h:77
llvm::yaml::Hex64 Address
Definition: XCOFFYAML.h:74
std::optional< XCOFF::DwarfSectionSubtypeFlags > SectionSubtype
Definition: XCOFFYAML.h:82
llvm::yaml::Hex64 Size
Definition: XCOFFYAML.h:75
llvm::yaml::Hex64 FileOffsetToData
Definition: XCOFFYAML.h:76
yaml::BinaryRef SectionData
Definition: XCOFFYAML.h:83
std::vector< Relocation > Relocations
Definition: XCOFFYAML.h:84
llvm::yaml::Hex16 NumberOfLineNumbers
Definition: XCOFFYAML.h:80
llvm::yaml::Hex16 NumberOfRelocations
Definition: XCOFFYAML.h:79
llvm::yaml::Hex64 FileOffsetToLineNumbers
Definition: XCOFFYAML.h:78
std::vector< std::unique_ptr< AuxSymbolEnt > > AuxEntries
Definition: XCOFFYAML.h:202
std::optional< uint16_t > SectionIndex
Definition: XCOFFYAML.h:198
std::optional< uint8_t > NumberOfAuxEntries
Definition: XCOFFYAML.h:201
llvm::yaml::Hex64 Value
Definition: XCOFFYAML.h:196
llvm::yaml::Hex16 Type
Definition: XCOFFYAML.h:199
XCOFF::StorageClass StorageClass
Definition: XCOFFYAML.h:200
std::optional< StringRef > SectionName
Definition: XCOFFYAML.h:197
uint32_t denormalize(IO &)
Definition: XCOFFYAML.cpp:186
NSectionFlags(IO &, uint32_t C)
Definition: XCOFFYAML.cpp:184
XCOFF::SectionTypeFlags Flags
Definition: XCOFFYAML.cpp:188