llvm/lld/wasm/SyntheticSections.cpp

//===- SyntheticSections.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
//
//===----------------------------------------------------------------------===//
//
// This file contains linker-synthesized sections.
//
//===----------------------------------------------------------------------===//

#include "SyntheticSections.h"

#include "InputChunks.h"
#include "InputElement.h"
#include "OutputSegment.h"
#include "SymbolTable.h"
#include "llvm/Support/Path.h"
#include <optional>

usingnamespacellvm;
usingnamespacellvm::wasm;

namespace lld::wasm {

OutStruct out;

namespace {

// Some synthetic sections (e.g. "name" and "linking") have subsections.
// Just like the synthetic sections themselves these need to be created before
// they can be written out (since they are preceded by their length). This
// class is used to create subsections and then write them into the stream
// of the parent section.
class SubSection {};

} // namespace

bool DylinkSection::isNeeded() const {}

void DylinkSection::writeBody() {}

uint32_t TypeSection::registerType(const WasmSignature &sig) {}

uint32_t TypeSection::lookupType(const WasmSignature &sig) {}

void TypeSection::writeBody() {}

uint32_t ImportSection::getNumImports() const {}

void ImportSection::addGOTEntry(Symbol *sym) {}

void ImportSection::addImport(Symbol *sym) {}

void ImportSection::writeBody() {}

void FunctionSection::writeBody() {}

void FunctionSection::addFunction(InputFunction *func) {}

void TableSection::writeBody() {}

void TableSection::addTable(InputTable *table) {}

void TableSection::assignIndexes() {}

void MemorySection::writeBody() {}

void TagSection::writeBody() {}

void TagSection::addTag(InputTag *tag) {}

void GlobalSection::assignIndexes() {}

static void ensureIndirectFunctionTable() {}

void GlobalSection::addInternalGOTEntry(Symbol *sym) {}

void GlobalSection::generateRelocationCode(raw_ostream &os, bool TLS) const {}

void GlobalSection::writeBody() {}

void GlobalSection::addGlobal(InputGlobal *global) {}

void ExportSection::writeBody() {}

bool StartSection::isNeeded() const {}

void StartSection::writeBody() {}

void ElemSection::addEntry(FunctionSymbol *sym) {}

void ElemSection::writeBody() {}

DataCountSection::DataCountSection(ArrayRef<OutputSegment *> segments)
    :{}

void DataCountSection::writeBody() {}

bool DataCountSection::isNeeded() const {}

void LinkingSection::writeBody() {}

void LinkingSection::addToSymtab(Symbol *sym) {}

unsigned NameSection::numNamedFunctions() const {}

unsigned NameSection::numNamedGlobals() const {}

unsigned NameSection::numNamedDataSegments() const {}

// Create the custom "name" section containing debug symbol names.
void NameSection::writeBody() {}

void ProducersSection::addInfo(const WasmProducerInfo &info) {}

void ProducersSection::writeBody() {}

void TargetFeaturesSection::writeBody() {}

void RelocSection::writeBody() {}

static size_t getHashSize() {}

BuildIdSection::BuildIdSection()
    :{}

void BuildIdSection::writeBody() {}

void BuildIdSection::writeBuildId(llvm::ArrayRef<uint8_t> buf) {}

} // namespace wasm::lld