LLVM  6.0.0svn
Macros | Functions
COFFObjectFile.cpp File Reference
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Triple.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/BinaryFormat/COFF.h"
#include "llvm/Object/Binary.h"
#include "llvm/Object/COFF.h"
#include "llvm/Object/Error.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/BinaryStreamReader.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/MemoryBuffer.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <limits>
#include <memory>
#include <system_error>
Include dependency graph for COFFObjectFile.cpp:

Go to the source code of this file.

Macros

#define LLVM_COFF_SWITCH_RELOC_TYPE_NAME(reloc_type)
 
#define RETURN_IF_ERROR(E)
 

Functions

static bool checkSize (MemoryBufferRef M, std::error_code &EC, uint64_t Size)
 
template<typename T >
static std::error_code getObject (const T *&Obj, MemoryBufferRef M, const void *Ptr, const uint64_t Size=sizeof(T))
 
static bool decodeBase64StringEntry (StringRef Str, uint32_t &Result)
 
static uint32_t getNumberOfRelocations (const coff_section *Sec, MemoryBufferRef M, const uint8_t *base)
 
static const coff_relocation * getFirstReloc (const coff_section *Sec, MemoryBufferRef M, const uint8_t *Base)
 
static imported_symbol_iterator makeImportedSymbolIterator (const COFFObjectFile *Object, uintptr_t Ptr, int Index)
 
static imported_symbol_iterator importedSymbolBegin (uint32_t RVA, const COFFObjectFile *Object)
 
static imported_symbol_iterator importedSymbolEnd (uint32_t RVA, const COFFObjectFile *Object)
 

Macro Definition Documentation

◆ LLVM_COFF_SWITCH_RELOC_TYPE_NAME

#define LLVM_COFF_SWITCH_RELOC_TYPE_NAME (   reloc_type)
Value:
case COFF::reloc_type: \
Res = #reloc_type; \
break;

Definition at line 1159 of file COFFObjectFile.cpp.

Referenced by llvm::object::COFFObjectFile::getRelocationTypeName().

◆ RETURN_IF_ERROR

#define RETURN_IF_ERROR (   E)
Value:
if (E) \
return E;
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")

Definition at line 1636 of file COFFObjectFile.cpp.

Referenced by llvm::object::ResourceSectionRef::getEntryNameString().

Function Documentation

◆ checkSize()

static bool checkSize ( MemoryBufferRef  M,
std::error_code &  EC,
uint64_t  Size 
)
static

◆ decodeBase64StringEntry()

static bool decodeBase64StringEntry ( StringRef  Str,
uint32_t Result 
)
static

◆ getFirstReloc()

static const coff_relocation* getFirstReloc ( const coff_section *  Sec,
MemoryBufferRef  M,
const uint8_t *  Base 
)
static

◆ getNumberOfRelocations()

static uint32_t getNumberOfRelocations ( const coff_section *  Sec,
MemoryBufferRef  M,
const uint8_t *  base 
)
static

◆ getObject()

template<typename T >
static std::error_code getObject ( const T *&  Obj,
MemoryBufferRef  M,
const void *  Ptr,
const uint64_t  Size = sizeof(T) 
)
static

◆ importedSymbolBegin()

static imported_symbol_iterator importedSymbolBegin ( uint32_t  RVA,
const COFFObjectFile *  Object 
)
static

◆ importedSymbolEnd()

static imported_symbol_iterator importedSymbolEnd ( uint32_t  RVA,
const COFFObjectFile *  Object 
)
static

◆ makeImportedSymbolIterator()

static imported_symbol_iterator makeImportedSymbolIterator ( const COFFObjectFile *  Object,
uintptr_t  Ptr,
int  Index 
)
static

Definition at line 1284 of file COFFObjectFile.cpp.

References P.

Referenced by importedSymbolBegin(), and importedSymbolEnd().