#include "InputFiles.h"
#include "Config.h"
#include "InputChunks.h"
#include "InputElement.h"
#include "OutputSegment.h"
#include "SymbolTable.h"
#include "lld/Common/Args.h"
#include "lld/Common/CommonLinkerContext.h"
#include "lld/Common/Reproduce.h"
#include "llvm/BinaryFormat/Wasm.h"
#include "llvm/Object/Binary.h"
#include "llvm/Object/Wasm.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/TarWriter.h"
#include "llvm/Support/raw_ostream.h"
#include <optional>
#define DEBUG_TYPE …
usingnamespacellvm;
usingnamespacellvm::object;
usingnamespacellvm::wasm;
usingnamespacellvm::sys;
namespace lld {
std::string toString(const wasm::InputFile *file) { … }
namespace wasm {
void InputFile::checkArch(Triple::ArchType arch) const { … }
std::unique_ptr<llvm::TarWriter> tar;
std::optional<MemoryBufferRef> readFile(StringRef path) { … }
InputFile *createObjectFile(MemoryBufferRef mb, StringRef archiveName,
uint64_t offsetInArchive, bool lazy) { … }
uint32_t ObjFile::calcNewIndex(const WasmRelocation &reloc) const { … }
int64_t ObjFile::calcNewAddend(const WasmRelocation &reloc) const { … }
uint64_t ObjFile::calcNewValue(const WasmRelocation &reloc, uint64_t tombstone,
const InputChunk *chunk) const { … }
template <class T>
static void setRelocs(const std::vector<T *> &chunks,
const WasmSection *section) { … }
void ObjFile::addLegacyIndirectFunctionTableIfNeeded(
uint32_t tableSymbolCount) { … }
static bool shouldMerge(const WasmSection &sec) { … }
static bool shouldMerge(const WasmSegment &seg) { … }
void ObjFile::parseLazy() { … }
ObjFile::ObjFile(MemoryBufferRef m, StringRef archiveName, bool lazy)
: … { … }
void SharedFile::parse() { … }
WasmFileBase::WasmFileBase(Kind k, MemoryBufferRef m) : … { … }
void ObjFile::parse(bool ignoreComdats) { … }
bool ObjFile::isExcludedByComdat(const InputChunk *chunk) const { … }
FunctionSymbol *ObjFile::getFunctionSymbol(uint32_t index) const { … }
GlobalSymbol *ObjFile::getGlobalSymbol(uint32_t index) const { … }
TagSymbol *ObjFile::getTagSymbol(uint32_t index) const { … }
TableSymbol *ObjFile::getTableSymbol(uint32_t index) const { … }
SectionSymbol *ObjFile::getSectionSymbol(uint32_t index) const { … }
DataSymbol *ObjFile::getDataSymbol(uint32_t index) const { … }
Symbol *ObjFile::createDefined(const WasmSymbol &sym) { … }
Symbol *ObjFile::createUndefined(const WasmSymbol &sym, bool isCalledDirectly) { … }
static StringRef strip(StringRef s) { … }
void StubFile::parse() { … }
static uint8_t mapVisibility(GlobalValue::VisibilityTypes gvVisibility) { … }
static Symbol *createBitcodeSymbol(const std::vector<bool> &keptComdats,
const lto::InputFile::Symbol &objSym,
BitcodeFile &f) { … }
BitcodeFile::BitcodeFile(MemoryBufferRef m, StringRef archiveName,
uint64_t offsetInArchive, bool lazy)
: … { … }
bool BitcodeFile::doneLTO = …;
void BitcodeFile::parseLazy() { … }
void BitcodeFile::parse(StringRef symName) { … }
}
}