llvm/llvm/lib/Object/ELFObjectFile.cpp

//===- ELFObjectFile.cpp - ELF object file implementation -----------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// Part of the ELFObjectFile class implementation.
//
//===----------------------------------------------------------------------===//

#include "llvm/Object/ELFObjectFile.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/MC/MCInstrAnalysis.h"
#include "llvm/MC/TargetRegistry.h"
#include "llvm/Object/ELF.h"
#include "llvm/Object/ELFTypes.h"
#include "llvm/Object/Error.h"
#include "llvm/Support/ARMAttributeParser.h"
#include "llvm/Support/ARMBuildAttributes.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/HexagonAttributeParser.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/RISCVAttributeParser.h"
#include "llvm/Support/RISCVAttributes.h"
#include "llvm/TargetParser/RISCVISAInfo.h"
#include "llvm/TargetParser/SubtargetFeature.h"
#include "llvm/TargetParser/Triple.h"
#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <optional>
#include <string>
#include <utility>

usingnamespacellvm;
usingnamespaceobject;

const EnumEntry<unsigned> llvm::object::ElfSymbolTypes[NumElfSymbolTypes] =;

ELFObjectFileBase::ELFObjectFileBase(unsigned int Type, MemoryBufferRef Source)
    :{}

template <class ELFT>
static Expected<std::unique_ptr<ELFObjectFile<ELFT>>>
createPtr(MemoryBufferRef Object, bool InitContent) {}

Expected<std::unique_ptr<ObjectFile>>
ObjectFile::createELFObjectFile(MemoryBufferRef Obj, bool InitContent) {}

SubtargetFeatures ELFObjectFileBase::getMIPSFeatures() const {}

SubtargetFeatures ELFObjectFileBase::getARMFeatures() const {}

static std::optional<std::string> hexagonAttrToFeatureString(unsigned Attr) {}

SubtargetFeatures ELFObjectFileBase::getHexagonFeatures() const {}

Expected<SubtargetFeatures> ELFObjectFileBase::getRISCVFeatures() const {}

SubtargetFeatures ELFObjectFileBase::getLoongArchFeatures() const {}

Expected<SubtargetFeatures> ELFObjectFileBase::getFeatures() const {}

std::optional<StringRef> ELFObjectFileBase::tryGetCPUName() const {}

StringRef ELFObjectFileBase::getAMDGPUCPUName() const {}

StringRef ELFObjectFileBase::getNVPTXCPUName() const {}

// FIXME Encode from a tablegen description or target parser.
void ELFObjectFileBase::setARMSubArch(Triple &TheTriple) const {}

std::vector<ELFPltEntry> ELFObjectFileBase::getPltEntries() const {}

template <class ELFT>
Expected<std::vector<BBAddrMap>> static readBBAddrMapImpl(
    const ELFFile<ELFT> &EF, std::optional<unsigned> TextSectionIndex,
    std::vector<PGOAnalysisMap> *PGOAnalyses) {}

template <class ELFT>
static Expected<std::vector<VersionEntry>>
readDynsymVersionsImpl(const ELFFile<ELFT> &EF,
                       ELFObjectFileBase::elf_symbol_iterator_range Symbols) {}

Expected<std::vector<VersionEntry>>
ELFObjectFileBase::readDynsymVersions() const {}

Expected<std::vector<BBAddrMap>> ELFObjectFileBase::readBBAddrMap(
    std::optional<unsigned> TextSectionIndex,
    std::vector<PGOAnalysisMap> *PGOAnalyses) const {}

StringRef ELFObjectFileBase::getCrelDecodeProblem(SectionRef Sec) const {}