#include "Symbols.h"
#include "Config.h"
#include "InputChunks.h"
#include "InputElement.h"
#include "InputFiles.h"
#include "OutputSections.h"
#include "OutputSegment.h"
#include "SymbolTable.h"
#include "lld/Common/ErrorHandler.h"
#include "lld/Common/Memory.h"
#include "llvm/Demangle/Demangle.h"
#define DEBUG_TYPE …
usingnamespacellvm;
usingnamespacellvm::object;
usingnamespacellvm::wasm;
usingnamespacelld::wasm;
namespace lld {
std::string toString(const wasm::Symbol &sym) { … }
std::string maybeDemangleSymbol(StringRef name) { … }
std::string toString(wasm::Symbol::Kind kind) { … }
namespace wasm {
DefinedFunction *WasmSym::callCtors;
DefinedFunction *WasmSym::callDtors;
DefinedFunction *WasmSym::initMemory;
DefinedFunction *WasmSym::applyDataRelocs;
DefinedFunction *WasmSym::applyGlobalRelocs;
DefinedFunction *WasmSym::applyTLSRelocs;
DefinedFunction *WasmSym::applyGlobalTLSRelocs;
DefinedFunction *WasmSym::initTLS;
DefinedFunction *WasmSym::startFunction;
DefinedData *WasmSym::dsoHandle;
DefinedData *WasmSym::dataEnd;
DefinedData *WasmSym::globalBase;
DefinedData *WasmSym::heapBase;
DefinedData *WasmSym::heapEnd;
DefinedData *WasmSym::initMemoryFlag;
GlobalSymbol *WasmSym::stackPointer;
DefinedData *WasmSym::stackLow;
DefinedData *WasmSym::stackHigh;
GlobalSymbol *WasmSym::tlsBase;
GlobalSymbol *WasmSym::tlsSize;
GlobalSymbol *WasmSym::tlsAlign;
UndefinedGlobal *WasmSym::tableBase;
DefinedData *WasmSym::definedTableBase;
UndefinedGlobal *WasmSym::memoryBase;
DefinedData *WasmSym::definedMemoryBase;
TableSymbol *WasmSym::indirectFunctionTable;
WasmSymbolType Symbol::getWasmType() const { … }
const WasmSignature *Symbol::getSignature() const { … }
InputChunk *Symbol::getChunk() const { … }
bool Symbol::isDiscarded() const { … }
bool Symbol::isLive() const { … }
void Symbol::markLive() { … }
uint32_t Symbol::getOutputSymbolIndex() const { … }
void Symbol::setOutputSymbolIndex(uint32_t index) { … }
void Symbol::setGOTIndex(uint32_t index) { … }
bool Symbol::isWeak() const { … }
bool Symbol::isLocal() const { … }
bool Symbol::isHidden() const { … }
bool Symbol::isTLS() const { … }
void Symbol::setHidden(bool isHidden) { … }
bool Symbol::isImported() const { … }
bool Symbol::isExported() const { … }
bool Symbol::isExportedExplicit() const { … }
bool Symbol::isNoStrip() const { … }
uint32_t FunctionSymbol::getFunctionIndex() const { … }
void FunctionSymbol::setFunctionIndex(uint32_t index) { … }
bool FunctionSymbol::hasFunctionIndex() const { … }
uint32_t FunctionSymbol::getTableIndex() const { … }
bool FunctionSymbol::hasTableIndex() const { … }
void FunctionSymbol::setTableIndex(uint32_t index) { … }
DefinedFunction::DefinedFunction(StringRef name, uint32_t flags, InputFile *f,
InputFunction *function)
: … { … }
uint32_t DefinedFunction::getExportedFunctionIndex() const { … }
uint64_t DefinedData::getVA() const { … }
void DefinedData::setVA(uint64_t value_) { … }
uint64_t DefinedData::getOutputSegmentOffset() const { … }
uint64_t DefinedData::getOutputSegmentIndex() const { … }
uint32_t GlobalSymbol::getGlobalIndex() const { … }
void GlobalSymbol::setGlobalIndex(uint32_t index) { … }
bool GlobalSymbol::hasGlobalIndex() const { … }
DefinedGlobal::DefinedGlobal(StringRef name, uint32_t flags, InputFile *file,
InputGlobal *global)
: … { … }
uint32_t TagSymbol::getTagIndex() const { … }
void TagSymbol::setTagIndex(uint32_t index) { … }
bool TagSymbol::hasTagIndex() const { … }
DefinedTag::DefinedTag(StringRef name, uint32_t flags, InputFile *file,
InputTag *tag)
: … { … }
void TableSymbol::setLimits(const WasmLimits &limits) { … }
uint32_t TableSymbol::getTableNumber() const { … }
void TableSymbol::setTableNumber(uint32_t number) { … }
bool TableSymbol::hasTableNumber() const { … }
DefinedTable::DefinedTable(StringRef name, uint32_t flags, InputFile *file,
InputTable *table)
: … { … }
const OutputSectionSymbol *SectionSymbol::getOutputSectionSymbol() const { … }
void LazySymbol::extract() { … }
void LazySymbol::setWeak() { … }
void printTraceSymbolUndefined(StringRef name, const InputFile* file) { … }
void printTraceSymbol(Symbol *sym) { … }
const char *defaultModule = …;
const char *functionTableName = …;
const char *memoryName = …;
}
}