LLVM
8.0.1
|
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/MC/MCAsmBackend.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCAsmLayout.h"
#include "llvm/MC/MCAssembler.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCELFObjectWriter.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCFixup.h"
#include "llvm/MC/MCFixupKindInfo.h"
#include "llvm/MC/MCFragment.h"
#include "llvm/MC/MCObjectFileInfo.h"
#include "llvm/MC/MCObjectWriter.h"
#include "llvm/MC/MCSection.h"
#include "llvm/MC/MCSectionELF.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/MC/MCSymbolELF.h"
#include "llvm/MC/MCValue.h"
#include "llvm/MC/StringTableBuilder.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compression.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Host.h"
#include "llvm/Support/LEB128.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/SMLoc.h"
#include "llvm/Support/StringSaver.h"
#include "llvm/Support/SwapByteOrder.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <map>
#include <memory>
#include <string>
#include <utility>
#include <vector>
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "reloc-info" |
Functions | |
static uint8_t | mergeTypeForSet (uint8_t origType, uint8_t newType) |
static bool | isWeak (const MCSymbolELF &Sym) |
#define DEBUG_TYPE "reloc-info" |
Definition at line 66 of file ELFObjectWriter.cpp.
|
static |
Definition at line 559 of file ELFObjectWriter.cpp.
References llvm::ELFRelocationEntry::Addend, llvm::Address, llvm::array_pod_sort(), assert(), llvm::support::big, C, llvm::zlib::compress(), llvm::MCAsmInfo::compressDebugSections(), llvm::consumeError(), llvm::MCAssembler::CGProfileEntry::Count, llvm::MCSymbolRefExpr::create(), llvm::MCContext::createELFGroupSection(), llvm::MCContext::createELFRelSection(), llvm::SmallVectorTemplateCommon< T >::data(), llvm::StringRef::drop_front(), E, llvm::ELF::ELFCOMPRESS_ZLIB, llvm::ELF::EM_MIPS, llvm::ArrayRef< T >::empty(), llvm::encodeULEB128(), llvm::StringRef::find(), Fixup, llvm::MCFixupKindInfo::FKF_IsPCRel, llvm::MCAssembler::CGProfileEntry::From, llvm::MCSection::getAlignment(), llvm::MCContext::getAsmInfo(), llvm::MCSectionELF::getAssociatedSection(), llvm::MCSectionELF::getAssociatedSymbol(), llvm::MCAssembler::getBackend(), llvm::MCAsmLayout::getBaseSymbol(), llvm::MCSection::getBeginSymbol(), llvm::MCSymbolELF::getBinding(), llvm::MCValue::getConstant(), llvm::MCAssembler::getContext(), llvm::MCContext::getELFSection(), llvm::MCSectionELF::getEntrySize(), llvm::MCAssembler::getFileNames(), llvm::MCAsmBackend::getFixupKindInfo(), llvm::MCSectionELF::getFlags(), llvm::MCAsmLayout::getFragmentOffset(), llvm::MCSectionELF::getGroup(), llvm::MCSymbol::getIndex(), llvm::MCFixup::getKind(), llvm::MCSymbolRefExpr::getKind(), llvm::MCFixup::getLoc(), llvm::MCSymbol::getName(), llvm::MCFixup::getOffset(), llvm::MCContext::getOrCreateSymbol(), llvm::MCSymbolELF::getOther(), llvm::MCFragment::getParent(), llvm::MCSymbol::getSection(), llvm::MCAsmLayout::getSectionAddressSize(), llvm::MCSectionELF::getSectionName(), llvm::MCValue::getSymA(), llvm::MCValue::getSymB(), llvm::MCSymbolRefExpr::getSymbol(), llvm::MCAsmLayout::getSymbolOffset(), llvm::MCSymbolELF::getType(), llvm::MCSectionELF::getType(), getType(), llvm::MCSymbol::getVariableValue(), llvm::GNU, Groups, llvm::ELF::GRP_COMDAT, Info, is64Bit(), llvm::MCSymbol::isAbsolute(), llvm::MCSymbolELF::isBindingSet(), llvm::MCSymbol::isCommon(), llvm::MCSymbol::isExternal(), llvm::MCSymbol::isInSection(), isInSymtab(), llvm::MCSection::isRegistered(), llvm::MCSymbolELF::isSignature(), llvm::MCObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(), llvm::MCSymbol::isTemporary(), llvm::MCAssembler::isThumbFunc(), llvm::MCSymbol::isUndefined(), llvm::MCSymbol::isUsedInReloc(), llvm::MCSymbol::isVariable(), llvm::MCSymbolELF::isWeakrefUsedInReloc(), Kind, llvm::codeview::Link, llvm_unreachable, Magic, Mode, Name, llvm::None, llvm::StringRef::npos, llvm::ELFRelocationEntry::Offset, offsetof, P, llvm::cl::Prefix, llvm::raw_pwrite_stream::pwrite(), llvm::RISCVFenceField::R, llvm::ELF::Elf32_Rela::r_info, llvm::ELF::Elf64_Rela::r_info, llvm::Ref, llvm::MCAssembler::registerSymbol(), llvm::MCContext::reportError(), llvm::reverse(), llvm::ARMBuildAttrs::Section, AMDGPU::ElfNote::SectionName, llvm::MCSection::setAlignment(), llvm::MCSectionELF::setFlags(), llvm::ELF::Elf32_Rela::setSymbolAndType(), llvm::ELF::Elf64_Rela::setSymbolAndType(), llvm::MCSymbol::setUsedInReloc(), llvm::ELF::SHF_COMPRESSED, llvm::ELF::SHF_EXCLUDE, llvm::ELF::SHF_GROUP, llvm::ELF::SHF_LINK_ORDER, llvm::ELF::SHF_MERGE, llvm::ELF::SHF_TLS, llvm::ELF::SHN_ABS, llvm::ELF::SHN_COMMON, llvm::ELF::SHN_LORESERVE, llvm::ELF::SHN_UNDEF, llvm::ELF::SHT_DYNAMIC, llvm::ELF::SHT_GROUP, llvm::ELF::SHT_LLVM_ADDRSIG, llvm::ELF::SHT_LLVM_CALL_GRAPH_PROFILE, llvm::ELF::SHT_NOBITS, llvm::ELF::SHT_REL, llvm::ELF::SHT_RELA, llvm::ELF::SHT_STRTAB, llvm::ELF::SHT_SYMTAB, llvm::ELF::SHT_SYMTAB_SHNDX, Size, llvm::SmallVectorBase::size(), llvm::StringRef::size(), llvm::StringRef::startswith(), llvm::ELF::STB_GLOBAL, llvm::ELF::STB_GNU_UNIQUE, llvm::ELF::STB_LOCAL, llvm::ELF::STB_WEAK, llvm::ELF::STT_FILE, llvm::ELF::STT_GNU_IFUNC, llvm::ELF::STT_SECTION, llvm::ELF::STV_DEFAULT, llvm::StringRef::substr(), llvm::ELFRelocationEntry::Symbol, llvm::ARMBuildAttrs::Symbol, llvm::MCAssembler::symbols(), llvm::ELF::SYMENTRY_SIZE32, llvm::ELF::SYMENTRY_SIZE64, llvm::MCAssembler::Symvers, llvm::MCAssembler::CGProfileEntry::To, llvm::ELFRelocationEntry::Type, llvm::MCSymbolRefExpr::VK_GOT, llvm::MCSymbolRefExpr::VK_GOTPCREL, llvm::MCSymbolRefExpr::VK_PLT, llvm::MCSymbolRefExpr::VK_PPC_GOT_HA, llvm::MCSymbolRefExpr::VK_PPC_GOT_HI, llvm::MCSymbolRefExpr::VK_PPC_GOT_LO, llvm::MCSymbolRefExpr::VK_PPC_TOCBASE, llvm::MCSymbolRefExpr::VK_WEAKREF, llvm::RISCVFenceField::W, write(), llvm::support::endian::write(), llvm::MCAssembler::writeSectionData(), and llvm::Z.
Referenced by llvm::AtomicCmpXchgInst::cloneImpl(), llvm::FunctionComparator::cmpOperations(), emitSignedInt64(), FunctionNumber(), llvm::irsymtab::Symbol::getCOFFWeakExternalFallback(), haveSameSpecialState(), llvm::JITSymbolFlags::isStrong(), and maybePrintCallAddrSpace().
|
static |
Definition at line 479 of file ELFObjectWriter.cpp.
References llvm::MCExpr::evaluateKnownAbsolute(), llvm::MCAsmLayout::getBaseSymbol(), Info, Other, llvm::report_fatal_error(), Size, llvm::ELF::STT_FUNC, llvm::ELF::STT_GNU_IFUNC, llvm::ELF::STT_NOTYPE, llvm::ELF::STT_OBJECT, llvm::ELF::STT_TLS, llvm::ARMBuildAttrs::Symbol, and Visibility.