LLVM  6.0.0svn
Functions
PPCMachObjectWriter.cpp File Reference
#include "MCTargetDesc/PPCFixupKinds.h"
#include "MCTargetDesc/PPCMCTargetDesc.h"
#include "llvm/ADT/Twine.h"
#include "llvm/BinaryFormat/MachO.h"
#include "llvm/MC/MCAsmLayout.h"
#include "llvm/MC/MCAssembler.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCMachObjectWriter.h"
#include "llvm/MC/MCSectionMachO.h"
#include "llvm/MC/MCValue.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Format.h"
Include dependency graph for PPCMachObjectWriter.cpp:

Go to the source code of this file.

Functions

static unsigned getFixupKindLog2Size (unsigned Kind)
 computes the log2 of the size of the relocation, used for relocation_info::r_length. More...
 
static unsigned getRelocType (const MCValue &Target, const MCFixupKind FixupKind, const bool IsPCRel)
 Translates generic PPC fixup kind to Mach-O/PPC relocation type enum. More...
 
static void makeRelocationInfo (MachO::any_relocation_info &MRE, const uint32_t FixupOffset, const uint32_t Index, const unsigned IsPCRel, const unsigned Log2Size, const unsigned IsExtern, const unsigned Type)
 
static void makeScatteredRelocationInfo (MachO::any_relocation_info &MRE, const uint32_t Addr, const unsigned Type, const unsigned Log2Size, const unsigned IsPCRel, const uint32_t Value2)
 
static uint32_t getFixupOffset (const MCAsmLayout &Layout, const MCFragment *Fragment, const MCFixup &Fixup)
 Compute fixup offset (address). More...
 

Function Documentation

◆ getFixupKindLog2Size()

static unsigned getFixupKindLog2Size ( unsigned  Kind)
static

◆ getFixupOffset()

static uint32_t getFixupOffset ( const MCAsmLayout Layout,
const MCFragment Fragment,
const MCFixup Fixup 
)
static

Compute fixup offset (address).

Definition at line 176 of file PPCMachObjectWriter.cpp.

References llvm::MachObjectWriter::addRelocation(), llvm::HexStyle::Asm, B, llvm::MachObjectWriter::doesSymbolRequireExternRelocation(), Fixup, llvm::PPC::fixup_ppc_half16, llvm::format(), llvm::MachO::GENERIC_RELOC_PAIR, llvm::MCAssembler::getContext(), getFixupKindLog2Size(), llvm::MCSymbol::getFragment(), llvm::MCAsmLayout::getFragmentOffset(), llvm::MCFixup::getKind(), llvm::MCFixup::getLoc(), llvm::MCSymbol::getName(), llvm::MCFixup::getOffset(), llvm::MCSection::getOrdinal(), llvm::MCFragment::getParent(), getRelocType(), llvm::MCSymbol::getSection(), llvm::MachObjectWriter::getSectionAddress(), llvm::MachObjectWriter::getSectionAddressMap(), llvm::MCValue::getSymA(), llvm::MCValue::getSymB(), llvm::MCSymbolRefExpr::getSymbol(), llvm::MachObjectWriter::getSymbolAddress(), llvm::MCAsmLayout::getSymbolOffset(), llvm::MCSymbol::getVariableValue(), llvm::MCValue::isAbsolute(), llvm::MachObjectWriter::isFixupKindPCRel(), llvm::MCSymbol::isUndefined(), llvm::MCSymbol::isVariable(), llvm_unreachable, makeRelocationInfo(), makeScatteredRelocationInfo(), llvm::MachO::PPC_RELOC_BR14, llvm::MachO::PPC_RELOC_BR24, llvm::MachO::PPC_RELOC_HA16_SECTDIFF, llvm::MachO::PPC_RELOC_HI16_SECTDIFF, llvm::MachO::PPC_RELOC_LO14_SECTDIFF, llvm::MachO::PPC_RELOC_LO16_SECTDIFF, llvm::MachO::PPC_RELOC_LOCAL_SECTDIFF, llvm::MachO::PPC_RELOC_SECTDIFF, llvm::report_fatal_error(), and llvm::MCContext::reportError().

◆ getRelocType()

static unsigned getRelocType ( const MCValue Target,
const MCFixupKind  FixupKind,
const bool  IsPCRel 
)
static

◆ makeRelocationInfo()

static void makeRelocationInfo ( MachO::any_relocation_info MRE,
const uint32_t  FixupOffset,
const uint32_t  Index,
const unsigned  IsPCRel,
const unsigned  Log2Size,
const unsigned  IsExtern,
const unsigned  Type 
)
static

◆ makeScatteredRelocationInfo()

static void makeScatteredRelocationInfo ( MachO::any_relocation_info MRE,
const uint32_t  Addr,
const unsigned  Type,
const unsigned  Log2Size,
const unsigned  IsPCRel,
const uint32_t  Value2 
)
static