LLVM 20.0.0git
Macros | Functions
ELF.cpp File Reference
#include "llvm/Object/ELF.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/DataExtractor.h"
#include "llvm/BinaryFormat/ELFRelocs/M68k.def"
#include "llvm/BinaryFormat/ELFRelocs/x86_64.def"
#include "llvm/BinaryFormat/ELFRelocs/i386.def"
#include "llvm/BinaryFormat/ELFRelocs/Mips.def"
#include "llvm/BinaryFormat/ELFRelocs/AArch64.def"
#include "llvm/BinaryFormat/ELFRelocs/ARM.def"
#include "llvm/BinaryFormat/ELFRelocs/ARC.def"
#include "llvm/BinaryFormat/ELFRelocs/AVR.def"
#include "llvm/BinaryFormat/ELFRelocs/Hexagon.def"
#include "llvm/BinaryFormat/ELFRelocs/Lanai.def"
#include "llvm/BinaryFormat/ELFRelocs/PowerPC.def"
#include "llvm/BinaryFormat/ELFRelocs/PowerPC64.def"
#include "llvm/BinaryFormat/ELFRelocs/RISCV.def"
#include "llvm/BinaryFormat/ELFRelocs/SystemZ.def"
#include "llvm/BinaryFormat/ELFRelocs/Sparc.def"
#include "llvm/BinaryFormat/ELFRelocs/AMDGPU.def"
#include "llvm/BinaryFormat/ELFRelocs/BPF.def"
#include "llvm/BinaryFormat/ELFRelocs/MSP430.def"
#include "llvm/BinaryFormat/ELFRelocs/VE.def"
#include "llvm/BinaryFormat/ELFRelocs/CSKY.def"
#include "llvm/BinaryFormat/ELFRelocs/LoongArch.def"
#include "llvm/BinaryFormat/ELFRelocs/Xtensa.def"
#include "llvm/BinaryFormat/DynamicTags.def"

Go to the source code of this file.

Macros

#define STRINGIFY_ENUM_CASE(ns, name)
 
#define ELF_RELOC(name, value)   STRINGIFY_ENUM_CASE(ELF, name)
 
#define DYNAMIC_STRINGIFY_ENUM(tag, value)
 
#define DYNAMIC_TAG(n, v)
 
#define AARCH64_DYNAMIC_TAG(name, value)   DYNAMIC_STRINGIFY_ENUM(name, value)
 
#define HEXAGON_DYNAMIC_TAG(name, value)   DYNAMIC_STRINGIFY_ENUM(name, value)
 
#define MIPS_DYNAMIC_TAG(name, value)   DYNAMIC_STRINGIFY_ENUM(name, value)
 
#define PPC_DYNAMIC_TAG(name, value)   DYNAMIC_STRINGIFY_ENUM(name, value)
 
#define PPC64_DYNAMIC_TAG(name, value)   DYNAMIC_STRINGIFY_ENUM(name, value)
 
#define RISCV_DYNAMIC_TAG(name, value)   DYNAMIC_STRINGIFY_ENUM(name, value)
 
#define AARCH64_DYNAMIC_TAG(name, value)
 
#define MIPS_DYNAMIC_TAG(name, value)
 
#define HEXAGON_DYNAMIC_TAG(name, value)
 
#define PPC_DYNAMIC_TAG(name, value)
 
#define PPC64_DYNAMIC_TAG(name, value)
 
#define RISCV_DYNAMIC_TAG(name, value)
 
#define DYNAMIC_TAG_MARKER(name, value)
 
#define DYNAMIC_TAG(name, value)   case value: return #name;
 

Functions

template<typename IntTy , std::enable_if_t< std::is_unsigned_v< IntTy >, int > = 0>
static IntTy readULEB128As (DataExtractor &Data, DataExtractor::Cursor &Cur, Error &ULEBSizeErr)
 
template<typename ELFT >
static Expected< std::vector< BBAddrMap > > decodeBBAddrMapImpl (const ELFFile< ELFT > &EF, const typename ELFFile< ELFT >::Elf_Shdr &Sec, const typename ELFFile< ELFT >::Elf_Shdr *RelaSec, std::vector< PGOAnalysisMap > *PGOAnalyses)
 

Macro Definition Documentation

◆ AARCH64_DYNAMIC_TAG [1/2]

#define AARCH64_DYNAMIC_TAG (   name,
  value 
)    DYNAMIC_STRINGIFY_ENUM(name, value)

◆ AARCH64_DYNAMIC_TAG [2/2]

#define AARCH64_DYNAMIC_TAG (   name,
  value 
)

◆ DYNAMIC_STRINGIFY_ENUM

#define DYNAMIC_STRINGIFY_ENUM (   tag,
  value 
)
Value:
case value: \
return #tag;
Given that RA is a live value

◆ DYNAMIC_TAG [1/2]

#define DYNAMIC_TAG (   n,
 
)

◆ DYNAMIC_TAG [2/2]

#define DYNAMIC_TAG (   name,
  value 
)    case value: return #name;

◆ DYNAMIC_TAG_MARKER

#define DYNAMIC_TAG_MARKER (   name,
  value 
)

◆ ELF_RELOC

#define ELF_RELOC (   name,
  value 
)    STRINGIFY_ENUM_CASE(ELF, name)

Definition at line 22 of file ELF.cpp.

◆ HEXAGON_DYNAMIC_TAG [1/2]

#define HEXAGON_DYNAMIC_TAG (   name,
  value 
)    DYNAMIC_STRINGIFY_ENUM(name, value)

◆ HEXAGON_DYNAMIC_TAG [2/2]

#define HEXAGON_DYNAMIC_TAG (   name,
  value 
)

◆ MIPS_DYNAMIC_TAG [1/2]

#define MIPS_DYNAMIC_TAG (   name,
  value 
)    DYNAMIC_STRINGIFY_ENUM(name, value)

◆ MIPS_DYNAMIC_TAG [2/2]

#define MIPS_DYNAMIC_TAG (   name,
  value 
)

◆ PPC64_DYNAMIC_TAG [1/2]

#define PPC64_DYNAMIC_TAG (   name,
  value 
)    DYNAMIC_STRINGIFY_ENUM(name, value)

◆ PPC64_DYNAMIC_TAG [2/2]

#define PPC64_DYNAMIC_TAG (   name,
  value 
)

◆ PPC_DYNAMIC_TAG [1/2]

#define PPC_DYNAMIC_TAG (   name,
  value 
)    DYNAMIC_STRINGIFY_ENUM(name, value)

◆ PPC_DYNAMIC_TAG [2/2]

#define PPC_DYNAMIC_TAG (   name,
  value 
)

◆ RISCV_DYNAMIC_TAG [1/2]

#define RISCV_DYNAMIC_TAG (   name,
  value 
)    DYNAMIC_STRINGIFY_ENUM(name, value)

◆ RISCV_DYNAMIC_TAG [2/2]

#define RISCV_DYNAMIC_TAG (   name,
  value 
)

◆ STRINGIFY_ENUM_CASE

#define STRINGIFY_ENUM_CASE (   ns,
  name 
)
Value:
case ns::name: \
return #name;
static const char * name
Definition: SMEABIPass.cpp:46

Definition at line 18 of file ELF.cpp.

Function Documentation

◆ decodeBBAddrMapImpl()

template<typename ELFT >
static Expected< std::vector< BBAddrMap > > decodeBBAddrMapImpl ( const ELFFile< ELFT > &  EF,
const typename ELFFile< ELFT >::Elf_Shdr &  Sec,
const typename ELFFile< ELFT >::Elf_Shdr *  RelaSec,
std::vector< PGOAnalysisMap > *  PGOAnalyses 
)
static

◆ readULEB128As()

template<typename IntTy , std::enable_if_t< std::is_unsigned_v< IntTy >, int > = 0>
static IntTy readULEB128As ( DataExtractor Data,
DataExtractor::Cursor Cur,
Error ULEBSizeErr 
)
static