LLVM  6.0.0svn
Macros | Functions
ELFObjectWriter.cpp File Reference
#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/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/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>
Include dependency graph for ELFObjectWriter.cpp:

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)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "reloc-info"

Definition at line 64 of file ELFObjectWriter.cpp.

Function Documentation

◆ isWeak()

static bool isWeak ( const MCSymbolELF Sym)
static

Definition at line 610 of file ELFObjectWriter.cpp.

References llvm::ELFRelocationEntry::Addend, llvm::dwarf::syntax::Address, llvm::array_pod_sort(), assert(), llvm::StringRef::begin(), C, llvm::SmallString< InternalLen >::c_str(), llvm::zlib::compress(), llvm::MCAsmInfo::compressDebugSections(), llvm::consumeError(), 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::StringRef::find(), Fixup, llvm::MCFixupKindInfo::FKF_IsPCRel, llvm::MCSection::getAlignment(), llvm::MCContext::getAsmInfo(), llvm::MCSectionELF::getAssociatedSection(), llvm::MCSectionELF::getAssociatedSymbol(), llvm::MCAssembler::getBackend(), llvm::MCAsmLayout::getBaseSymbol(), 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::MCFixup::getLoc(), llvm::MCSymbol::getName(), llvm::MCFixup::getOffset(), llvm::MCFragment::getParent(), getRelocType(), 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(), llvm::MCSymbol::getVariableValue(), llvm::GNU, llvm::ELF::GRP_COMDAT, is64Bit(), llvm::MCSymbol::isAbsolute(), llvm::MCSymbolELF::isBindingSet(), llvm::MCSymbol::isCommon(), llvm::sys::IsLittleEndianHost, llvm::MCSymbolELF::isSignature(), llvm::MCObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(), llvm::MCSymbol::isTemporary(), llvm::MCSymbol::isUndefined(), llvm::MCSymbol::isUsedInReloc(), llvm::MCSymbol::isVariable(), llvm::MCSymbolELF::isWeakrefUsedInReloc(), llvm::codeview::Link, llvm_unreachable, Magic, llvm::None, llvm::StringRef::npos, llvm::ELFRelocationEntry::Offset, llvm::ELF::Elf32_Rela::r_info, llvm::ELF::Elf64_Rela::r_info, 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::ELF::SHF_COMPRESSED, llvm::ELF::SHF_GROUP, llvm::ELF::SHF_LINK_ORDER, llvm::ELF::SHN_ABS, llvm::ELF::SHN_COMMON, llvm::ELF::SHN_LORESERVE, llvm::ELF::SHN_UNDEF, llvm::ELF::SHT_DYNAMIC, llvm::ELF::SHT_DYNSYM, llvm::ELF::SHT_GROUP, 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, llvm::SmallVectorTemplateCommon< T >::size(), llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::StringRef::size(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::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::sys::swapByteOrder(), llvm::ELFRelocationEntry::Symbol, llvm::ARMBuildAttrs::Symbol, llvm::MCAssembler::symbols(), llvm::ELF::SYMENTRY_SIZE32, llvm::ELF::SYMENTRY_SIZE64, llvm::ELFRelocationEntry::Type, llvm::MCSymbolRefExpr::VK_WEAKREF, write(), llvm::support::endian::write32(), llvm::MCAssembler::writeSectionData(), and llvm::Z.

Referenced by llvm::AtomicCmpXchgInst::cloneImpl(), llvm::FunctionComparator::cmpOperations(), emitSignedInt64(), FunctionNumber(), llvm::irsymtab::Symbol::getCOFFWeakExternalFallback(), haveSameSpecialState(), llvm::JITSymbolFlags::isStrongDefinition(), and maybePrintComdat().

◆ mergeTypeForSet()

static uint8_t mergeTypeForSet ( uint8_t  origType,
uint8_t  newType 
)
static