#include "SymbolTable.h"
#include "ConcatOutputSection.h"
#include "Config.h"
#include "InputFiles.h"
#include "InputSection.h"
#include "Symbols.h"
#include "SyntheticSections.h"
#include "lld/Common/ErrorHandler.h"
#include "lld/Common/Memory.h"
#include "llvm/Demangle/Demangle.h"
usingnamespacellvm;
usingnamespacelld;
usingnamespacelld::macho;
Symbol *SymbolTable::find(CachedHashStringRef cachedName) { … }
std::pair<Symbol *, bool> SymbolTable::insert(StringRef name,
const InputFile *file) { … }
namespace {
struct DuplicateSymbolDiag { … };
SmallVector<DuplicateSymbolDiag> dupSymDiags;
}
static void transplantSymbolsAtOffset(InputSection *fromIsec,
InputSection *toIsec, Defined *skip,
uint64_t fromOff, uint64_t toOff) { … }
Defined *SymbolTable::addDefined(StringRef name, InputFile *file,
InputSection *isec, uint64_t value,
uint64_t size, bool isWeakDef,
bool isPrivateExtern,
bool isReferencedDynamically, bool noDeadStrip,
bool isWeakDefCanBeHidden) { … }
Defined *SymbolTable::aliasDefined(Defined *src, StringRef target,
InputFile *newFile, bool makePrivateExtern) { … }
Symbol *SymbolTable::addUndefined(StringRef name, InputFile *file,
bool isWeakRef) { … }
Symbol *SymbolTable::addCommon(StringRef name, InputFile *file, uint64_t size,
uint32_t align, bool isPrivateExtern) { … }
Symbol *SymbolTable::addDylib(StringRef name, DylibFile *file, bool isWeakDef,
bool isTlv) { … }
Symbol *SymbolTable::addDynamicLookup(StringRef name) { … }
Symbol *SymbolTable::addLazyArchive(StringRef name, ArchiveFile *file,
const object::Archive::Symbol &sym) { … }
Symbol *SymbolTable::addLazyObject(StringRef name, InputFile &file) { … }
Defined *SymbolTable::addSynthetic(StringRef name, InputSection *isec,
uint64_t value, bool isPrivateExtern,
bool includeInSymtab,
bool referencedDynamically) { … }
enum class Boundary { … };
static Defined *createBoundarySymbol(const Undefined &sym) { … }
static void handleSectionBoundarySymbol(const Undefined &sym, StringRef segSect,
Boundary which) { … }
static void handleSegmentBoundarySymbol(const Undefined &sym, StringRef segName,
Boundary which) { … }
static bool recoverFromUndefinedSymbol(const Undefined &sym) { … }
namespace {
struct UndefinedDiag { … };
MapVector<const Undefined *, UndefinedDiag> undefs;
}
void macho::reportPendingDuplicateSymbols() { … }
static bool canSuggestExternCForCXX(StringRef ref, StringRef def) { … }
static const Symbol *getAlternativeSpelling(const Undefined &sym,
std::string &preHint,
std::string &postHint) { … }
static void reportUndefinedSymbol(const Undefined &sym,
const UndefinedDiag &locations,
bool correctSpelling) { … }
void macho::reportPendingUndefinedSymbols() { … }
void macho::treatUndefinedSymbol(const Undefined &sym, StringRef source) { … }
void macho::treatUndefinedSymbol(const Undefined &sym, const InputSection *isec,
uint64_t offset) { … }
std::unique_ptr<SymbolTable> macho::symtab;