LLVM  14.0.0git
Namespaces | Functions | Variables
ELFEmitter.cpp File Reference
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/MC/StringTableBuilder.h"
#include "llvm/Object/ELFObjectFile.h"
#include "llvm/Object/ELFTypes.h"
#include "llvm/ObjectYAML/DWARFEmitter.h"
#include "llvm/ObjectYAML/DWARFYAML.h"
#include "llvm/ObjectYAML/ELFYAML.h"
#include "llvm/ObjectYAML/yaml2obj.h"
#include "llvm/Support/EndianStream.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/LEB128.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/WithColor.h"
#include "llvm/Support/YAMLTraits.h"
#include "llvm/Support/raw_ostream.h"
Include dependency graph for ELFEmitter.cpp:

Go to the source code of this file.

Namespaces

 llvm
 This file implements support for optimizing divisions by a constant.
 
 llvm::yaml
 

Functions

template<class T >
static size_t arrayDataSize (ArrayRef< T > A)
 
template<class T >
static void writeArrayData (raw_ostream &OS, ArrayRef< T > A)
 
template<class T >
static void zero (T &Obj)
 
template<class ELFT >
static void overrideFields (ELFYAML::Section *From, typename ELFT::Shdr &To)
 
static uint64_t writeContent (ContiguousBlobAccumulator &CBA, const Optional< yaml::BinaryRef > &Content, const Optional< llvm::yaml::Hex64 > &Size)
 
static StringRef getDefaultLinkSec (unsigned SecType)
 
static size_t findFirstNonGlobal (ArrayRef< ELFYAML::Symbol > Symbols)
 
static bool shouldEmitDWARF (DWARFYAML::Data &DWARF, StringRef Name)
 
template<class ELFT >
Expected< uint64_temitDWARF (typename ELFT::Shdr &SHeader, StringRef Name, const DWARFYAML::Data &DWARF, ContiguousBlobAccumulator &CBA)
 
static bool isMips64EL (const ELFYAML::Object &Obj)
 
bool llvm::yaml::yaml2elf (ELFYAML::Object &Doc, raw_ostream &Out, ErrorHandler EH, uint64_t MaxSize)
 

Variables

constexpr char SuffixStart = '('
 
constexpr char SuffixEnd = ')'
 

Detailed Description

The ELF component of yaml2obj.

Definition in file ELFEmitter.cpp.

Function Documentation

◆ arrayDataSize()

template<class T >
static size_t arrayDataSize ( ArrayRef< T A)
static

Definition at line 327 of file ELFEmitter.cpp.

Referenced by writeArrayData().

◆ emitDWARF()

template<class ELFT >
Expected<uint64_t> emitDWARF ( typename ELFT::Shdr SHeader,
StringRef  Name,
const DWARFYAML::Data DWARF,
ContiguousBlobAccumulator &  CBA 
)

Definition at line 1074 of file ELFEmitter.cpp.

References llvm::DWARFYAML::getDWARFEmitterByName.

◆ findFirstNonGlobal()

static size_t findFirstNonGlobal ( ArrayRef< ELFYAML::Symbol Symbols)
static

Definition at line 929 of file ELFEmitter.cpp.

◆ getDefaultLinkSec()

static StringRef getDefaultLinkSec ( unsigned  SecType)
static

◆ isMips64EL()

static bool isMips64EL ( const ELFYAML::Object Obj)
static

◆ overrideFields()

template<class ELFT >
static void overrideFields ( ELFYAML::Section From,
typename ELFT::Shdr To 
)
static

Definition at line 634 of file ELFEmitter.cpp.

References From.

◆ shouldEmitDWARF()

static bool shouldEmitDWARF ( DWARFYAML::Data DWARF,
StringRef  Name 
)
static

◆ writeArrayData()

template<class T >
static void writeArrayData ( raw_ostream OS,
ArrayRef< T A 
)
static

Definition at line 331 of file ELFEmitter.cpp.

References arrayDataSize(), and llvm::raw_ostream::write().

◆ writeContent()

static uint64_t writeContent ( ContiguousBlobAccumulator &  CBA,
const Optional< yaml::BinaryRef > &  Content,
const Optional< llvm::yaml::Hex64 > &  Size 
)
static

Definition at line 718 of file ELFEmitter.cpp.

References Content, and llvm::Check::Size.

◆ zero()

template<class T >
static void zero ( T Obj)
static

Definition at line 335 of file ELFEmitter.cpp.

Variable Documentation

◆ SuffixEnd

constexpr char SuffixEnd = ')'
constexpr

◆ SuffixStart

constexpr char SuffixStart = '('
constexpr