LLVM
8.0.1
|
#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"
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... | |
computes the log2 of the size of the relocation, used for relocation_info::r_length.
Definition at line 58 of file PPCMachObjectWriter.cpp.
References llvm::PPC::fixup_ppc_br24, llvm::PPC::fixup_ppc_brcond14, llvm::PPC::fixup_ppc_half16, llvm::FK_Data_1, llvm::FK_Data_2, llvm::FK_Data_4, llvm::FK_Data_8, llvm::FK_PCRel_1, llvm::FK_PCRel_2, llvm::FK_PCRel_4, llvm::FK_PCRel_8, and llvm::report_fatal_error().
Referenced by getFixupOffset().
|
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().
|
static |
Translates generic PPC fixup kind to Mach-O/PPC relocation type enum.
Outline based on PPCELFObjectWriter::getRelocType().
Definition at line 83 of file PPCMachObjectWriter.cpp.
References llvm::PPC::fixup_ppc_br24, llvm::PPC::fixup_ppc_brcond14, llvm::PPC::fixup_ppc_half16, llvm::FK_Data_2, llvm::FK_Data_4, llvm::MachO::GENERIC_RELOC_VANILLA, llvm::MCSymbolRefExpr::getKind(), llvm::MCValue::getSymA(), llvm::MCValue::isAbsolute(), llvm_unreachable, llvm::MachO::PPC_RELOC_BR14, llvm::MachO::PPC_RELOC_BR24, llvm::MachO::PPC_RELOC_HA16, llvm::MachO::PPC_RELOC_HA16_SECTDIFF, llvm::MachO::PPC_RELOC_HI16, llvm::MachO::PPC_RELOC_HI16_SECTDIFF, llvm::MachO::PPC_RELOC_LO16, llvm::MachO::PPC_RELOC_LO16_SECTDIFF, llvm::report_fatal_error(), llvm::MCSymbolRefExpr::VK_None, llvm::MCSymbolRefExpr::VK_PPC_HA, llvm::MCSymbolRefExpr::VK_PPC_HI, and llvm::MCSymbolRefExpr::VK_PPC_LO.
Referenced by dumpRelocs(), getAccessVariant(), getFixupOffset(), llvm::MCELFObjectTargetWriter::getOSABI(), getPLTReloc(), getRelocType32(), IsEventType(), and isNonILP32reloc().
|
static |
Definition at line 146 of file PPCMachObjectWriter.cpp.
References llvm::MachO::any_relocation_info::r_word0, and llvm::MachO::any_relocation_info::r_word1.
Referenced by getFixupOffset().
|
static |
Definition at line 164 of file PPCMachObjectWriter.cpp.
References llvm::MachO::R_SCATTERED, llvm::MachO::any_relocation_info::r_word0, and llvm::MachO::any_relocation_info::r_word1.
Referenced by getFixupOffset().