LLVM 24.0.0git
COFFEmitter.cpp File Reference

The COFF component of yaml2obj. More...

Go to the source code of this file.

Classes

class  ContiguousBlobAccumulator

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
namespace  llvm::yaml

Functions

static bool layoutOptionalHeader (COFFParser &CP)
static yaml::BinaryRef toDebugS (ArrayRef< CodeViewYAML::YAMLDebugSubsection > Subsections, const codeview::StringsAndChecksums &SC, BumpPtrAllocator &Allocator)
static bool layoutCOFF (COFFParser &CP)
template<typename T>
static uint32_t initializeOptionalHeader (COFFParser &CP, uint16_t Magic, T Header)
static bool writeCOFF (COFFParser &CP, ContiguousBlobAccumulator &CBA)
template<typename T>
static void writeLoadConfig (T &S, ContiguousBlobAccumulator &CBA)
LLVM_ABI bool llvm::yaml::yaml2coff (COFFYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH, uint64_t MaxSize)

Detailed Description

The COFF component of yaml2obj.

Definition in file COFFEmitter.cpp.

Function Documentation

◆ initializeOptionalHeader()

◆ layoutCOFF()

◆ layoutOptionalHeader()

bool layoutOptionalHeader ( COFFParser & CP)
static

◆ toDebugS()

◆ writeCOFF()

bool writeCOFF ( COFFParser & CP,
ContiguousBlobAccumulator & CBA )
static

Definition at line 361 of file COFFEmitter.cpp.

References llvm::object::dos_header::AddressOfNewExeHeader, llvm::object::dos_header::AddressOfRelocationTable, assert(), llvm::object::pe32_header::BaseOfData, llvm::COFF::BigObjMagic, llvm::COFF::header::Characteristics, llvm::COFF::section::Characteristics, E(), llvm::WithColor::error(), llvm::yaml::ContiguousBlobAccumulator::getOffset(), llvm::COFFYAML::Object::Header, llvm::COFFYAML::Section::Header, llvm::COFFYAML::Symbol::Header, I, llvm::COFF::IMAGE_FILE_MACHINE_UNKNOWN, llvm::COFF::IMAGE_SCN_LNK_NRELOC_OVFL, initializeOptionalHeader(), llvm::COFF::header::Machine, llvm::object::dos_header::Magic, llvm::COFF::BigObjHeader::MinBigObjectVersion, llvm::COFF::section::Name, llvm::COFFYAML::Symbol::Name, llvm::COFF::NameSize, llvm::COFF::symbol::NumberOfAuxSymbols, llvm::COFF::section::NumberOfLineNumbers, llvm::COFF::section::NumberOfRelocations, llvm::COFF::header::NumberOfSections, llvm::COFF::header::NumberOfSymbols, llvm::COFFYAML::Object::OptionalHeader, llvm::COFF::PE32Header::PE32, llvm::COFF::PE32Header::PE32_PLUS, llvm::COFF::PEMagic, llvm::COFF::section::PointerToLineNumbers, llvm::COFF::section::PointerToRawData, llvm::COFF::section::PointerToRelocations, llvm::COFF::header::PointerToSymbolTable, llvm::COFFYAML::Section::Relocations, llvm::COFFYAML::Section::SectionData, llvm::COFFYAML::Object::Sections, Size, llvm::COFF::header::SizeOfOptionalHeader, llvm::COFF::section::SizeOfRawData, llvm::COFFYAML::Section::StructuredData, llvm::COFF::Symbol16Size, llvm::COFFYAML::Object::Symbols, llvm::COFF::header::TimeDateStamp, llvm::COFF::section::VirtualAddress, llvm::COFF::section::VirtualSize, llvm::yaml::ContiguousBlobAccumulator::write(), llvm::yaml::ContiguousBlobAccumulator::writeAsBinary(), and llvm::yaml::ContiguousBlobAccumulator::writeZeros().

Referenced by llvm::yaml::yaml2coff().

◆ writeLoadConfig()

template<typename T>
void writeLoadConfig ( T & S,
ContiguousBlobAccumulator & CBA )
static