llvm/lld/ELF/Symbols.cpp

//===- Symbols.cpp --------------------------------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//

#include "Symbols.h"
#include "Driver.h"
#include "InputFiles.h"
#include "InputSection.h"
#include "OutputSections.h"
#include "SyntheticSections.h"
#include "Target.h"
#include "Writer.h"
#include "lld/Common/ErrorHandler.h"
#include "llvm/Demangle/Demangle.h"
#include "llvm/Support/Compiler.h"
#include <cstring>

usingnamespacellvm;
usingnamespacellvm::object;
usingnamespacellvm::ELF;
usingnamespacelld;
usingnamespacelld::elf;

static_assert;

template <typename T> struct AssertSymbol {};

LLVM_ATTRIBUTE_UNUSED static inline void assertSymbols() {}

// Returns a symbol for an error message.
static std::string maybeDemangleSymbol(StringRef symName) {}

std::string lld::toString(const elf::Symbol &sym) {}

static uint64_t getSymVA(const Symbol &sym, int64_t addend) {}

uint64_t Symbol::getVA(int64_t addend) const {}

uint64_t Symbol::getGotVA(Ctx &ctx) const {}

uint64_t Symbol::getGotOffset(Ctx &ctx) const {}

uint64_t Symbol::getGotPltVA(Ctx &ctx) const {}

uint64_t Symbol::getGotPltOffset(Ctx &ctx) const {}

uint64_t Symbol::getPltVA(Ctx &ctx) const {}

uint64_t Symbol::getSize() const {}

OutputSection *Symbol::getOutputSection() const {}

// If a symbol name contains '@', the characters after that is
// a symbol version name. This function parses that.
void Symbol::parseSymbolVersion() {}

void Symbol::extract() const {}

uint8_t Symbol::computeBinding() const {}

bool Symbol::includeInDynsym() const {}

// Print out a log message for --trace-symbol.
void elf::printTraceSymbol(const Symbol &sym, StringRef name) {}

static void recordWhyExtract(const InputFile *reference,
                             const InputFile &extracted, const Symbol &sym) {}

void elf::maybeWarnUnorderableSymbol(const Symbol *sym) {}

// Returns true if a symbol can be replaced at load-time by a symbol
// with the same name defined in other ELF executable or DSO.
bool elf::computeIsPreemptible(Ctx &ctx, const Symbol &sym) {}

// Merge symbol properties.
//
// When we have many symbols of the same name, we choose one of them,
// and that's the result of symbol resolution. However, symbols that
// were not chosen still affect some symbol properties.
void Symbol::mergeProperties(const Symbol &other) {}

void Symbol::resolve(const Undefined &other) {}

// Compare two symbols. Return true if the new symbol should win.
bool Symbol::shouldReplace(const Defined &other) const {}

void elf::reportDuplicate(Ctx &ctx, const Symbol &sym, const InputFile *newFile,
                          InputSectionBase *errSec, uint64_t errOffset) {}

void Symbol::checkDuplicate(const Defined &other) const {}

void Symbol::resolve(const CommonSymbol &other) {}

void Symbol::resolve(const Defined &other) {}

void Symbol::resolve(const LazySymbol &other) {}

void Symbol::resolve(const SharedSymbol &other) {}

void Defined::overwrite(Symbol &sym) const {}