LLVM API Documentation
#include "llvm/MC/MCELFObjectWriter.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/SmallPtrSet.h"#include "llvm/ADT/SmallString.h"#include "llvm/ADT/StringMap.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/MCELF.h"#include "llvm/MC/MCELFSymbolFlags.h"#include "llvm/MC/MCExpr.h"#include "llvm/MC/MCFixupKindInfo.h"#include "llvm/MC/MCObjectWriter.h"#include "llvm/MC/MCSectionELF.h"#include "llvm/MC/MCValue.h"#include "llvm/MC/StringTableBuilder.h"#include "llvm/Support/Compression.h"#include "llvm/Support/Debug.h"#include "llvm/Support/Endian.h"#include "llvm/Support/ELF.h"#include "llvm/Support/ErrorHandling.h"#include <vector>
Go to the source code of this file.
Defines | |
| #define | DEBUG_TYPE "reloc-info" |
Typedefs | |
| typedef DenseMap< const MCSectionData *, std::vector < MCSymbolData * > > | DefiningSymbolMap |
Functions | |
| static uint8_t | mergeTypeForSet (uint8_t origType, uint8_t newType) |
| static const MCSymbol * | getWeakRef (const MCSymbolRefExpr &Ref) |
| static SmallVector< char, 128 > | getUncompressedData (MCAsmLayout &Layout, MCSectionData::FragmentListType &Fragments) |
| static bool | prependCompressionHeader (uint64_t Size, SmallVectorImpl< char > &CompressedContents) |
| static std::unique_ptr < MCDataFragment > | getCompressedFragment (MCAsmLayout &Layout, MCSectionData::FragmentListType &Fragments) |
| static void | UpdateSymbols (const MCAsmLayout &Layout, const std::vector< MCSymbolData * > &Symbols, MCFragment &NewFragment) |
| static void | CompressDebugSection (MCAssembler &Asm, MCAsmLayout &Layout, const DefiningSymbolMap &DefiningSymbols, const MCSectionELF &Section, MCSectionData &SD) |
| static int | cmpRel (const ELFRelocationEntry *AP, const ELFRelocationEntry *BP) |
| static void | sortRelocs (const MCAssembler &Asm, std::vector< ELFRelocationEntry > &Relocs) |
| #define DEBUG_TYPE "reloc-info" |
Definition at line 41 of file ELFObjectWriter.cpp.
| typedef DenseMap<const MCSectionData *, std::vector<MCSymbolData *> > DefiningSymbolMap |
Definition at line 1219 of file ELFObjectWriter.cpp.
Definition at line 1332 of file ELFObjectWriter.cpp.
References llvm::ARM_PROC::A, and llvm_unreachable.
Referenced by sortRelocs().
| static void CompressDebugSection | ( | MCAssembler & | Asm, |
| MCAsmLayout & | Layout, | ||
| const DefiningSymbolMap & | DefiningSymbols, | ||
| const MCSectionELF & | Section, | ||
| MCSectionData & | SD | ||
| ) | [static] |
Definition at line 1231 of file ELFObjectWriter.cpp.
References llvm::iplist< NodeTy, Traits >::clear(), llvm::StringRef::drop_front(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::find(), llvm::iplist< NodeTy, Traits >::front(), getCompressedFragment(), llvm::MCAssembler::getContext(), llvm::MCSectionData::getFragmentList(), llvm::MCSectionELF::getSectionName(), I, llvm::MCAsmLayout::invalidateFragmentsFrom(), llvm::iplist< NodeTy, Traits >::push_back(), llvm::MCContext::renameELFSection(), and UpdateSymbols().
| static std::unique_ptr<MCDataFragment> getCompressedFragment | ( | MCAsmLayout & | Layout, |
| MCSectionData::FragmentListType & | Fragments | ||
| ) | [static] |
Definition at line 1195 of file ELFObjectWriter.cpp.
References llvm::zlib::compress(), llvm::SmallVectorTemplateCommon< T >::data(), getUncompressedData(), prependCompressionHeader(), llvm::SmallVectorTemplateCommon< T >::size(), llvm::zlib::StatusOK, and Success.
Referenced by CompressDebugSection().
| static SmallVector<char, 128> getUncompressedData | ( | MCAsmLayout & | Layout, |
| MCSectionData::FragmentListType & | Fragments | ||
| ) | [static] |
Definition at line 1148 of file ELFObjectWriter.cpp.
References llvm::SmallVectorImpl< T >::append(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorTemplateCommon< T, typename >::end(), F(), llvm::MCFragment::getKind(), and llvm_unreachable.
Referenced by getCompressedFragment().
| static const MCSymbol* getWeakRef | ( | const MCSymbolRefExpr & | Ref | ) | [static] |
Definition at line 790 of file ELFObjectWriter.cpp.
References llvm::dyn_cast(), llvm::MCSymbolRefExpr::getKind(), llvm::MCSymbolRefExpr::getSymbol(), llvm::MCSymbol::getVariableValue(), and llvm::MCSymbol::isVariable().
| static uint8_t mergeTypeForSet | ( | uint8_t | origType, |
| uint8_t | newType | ||
| ) | [static] |
Definition at line 544 of file ELFObjectWriter.cpp.
References llvm::ELF::STT_FUNC, llvm::ELF::STT_GNU_IFUNC, llvm::ELF::STT_NOTYPE, llvm::ELF::STT_OBJECT, llvm::ELF::STT_TLS, and Type.
| static bool prependCompressionHeader | ( | uint64_t | Size, |
| SmallVectorImpl< char > & | CompressedContents | ||
| ) | [static] |
Definition at line 1176 of file ELFObjectWriter.cpp.
References llvm::StringRef::begin(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::StringRef::end(), llvm::SmallVectorImpl< T >::insert(), llvm::sys::IsLittleEndianHost, Magic, llvm::StringRef::size(), llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::sys::swapByteOrder().
Referenced by getCompressedFragment().
| static void sortRelocs | ( | const MCAssembler & | Asm, |
| std::vector< ELFRelocationEntry > & | Relocs | ||
| ) | [static] |
Definition at line 1342 of file ELFObjectWriter.cpp.
References llvm::array_pod_sort(), and cmpRel().
| static void UpdateSymbols | ( | const MCAsmLayout & | Layout, |
| const std::vector< MCSymbolData * > & | Symbols, | ||
| MCFragment & | NewFragment | ||
| ) | [static] |
Definition at line 1221 of file ELFObjectWriter.cpp.
References llvm::MCAsmLayout::getFragmentOffset().
Referenced by CompressDebugSection().