2018-01-10 01:13:34 +00:00
|
|
|
//===- InputChunks.h --------------------------------------------*- C++ -*-===//
|
|
|
|
//
|
2019-01-19 08:50:56 +00:00
|
|
|
// 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
|
2018-01-10 01:13:34 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2018-02-23 05:08:53 +00:00
|
|
|
// An InputChunks represents an indivisible opaque region of a input wasm file.
|
|
|
|
// i.e. a single wasm data segment or a single wasm function.
|
|
|
|
//
|
|
|
|
// They are written directly to the mmap'd output file after which relocations
|
|
|
|
// are applied. Because each Chunk is independent they can be written in
|
|
|
|
// parallel.
|
|
|
|
//
|
|
|
|
// Chunks are also unit on which garbage collection (--gc-sections) operates.
|
2018-01-10 01:13:34 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLD_WASM_INPUT_CHUNKS_H
|
|
|
|
#define LLD_WASM_INPUT_CHUNKS_H
|
|
|
|
|
2018-01-31 01:45:47 +00:00
|
|
|
#include "Config.h"
|
2018-01-10 01:13:34 +00:00
|
|
|
#include "InputFiles.h"
|
|
|
|
#include "lld/Common/ErrorHandler.h"
|
2018-11-27 01:08:16 +00:00
|
|
|
#include "lld/Common/LLVM.h"
|
2021-02-27 00:09:32 +00:00
|
|
|
#include "llvm/ADT/CachedHashString.h"
|
|
|
|
#include "llvm/MC/StringTableBuilder.h"
|
2018-01-10 01:13:34 +00:00
|
|
|
#include "llvm/Object/Wasm.h"
|
|
|
|
|
|
|
|
namespace lld {
|
|
|
|
namespace wasm {
|
|
|
|
|
|
|
|
class ObjFile;
|
|
|
|
class OutputSegment;
|
2019-05-21 09:13:09 +00:00
|
|
|
class OutputSection;
|
2018-01-10 01:13:34 +00:00
|
|
|
|
|
|
|
class InputChunk {
|
|
|
|
public:
|
2021-02-27 00:09:32 +00:00
|
|
|
enum Kind {
|
|
|
|
DataSegment,
|
|
|
|
Merge,
|
2021-05-14 23:25:04 +00:00
|
|
|
MergedChunk,
|
2021-02-27 00:09:32 +00:00
|
|
|
Function,
|
|
|
|
SyntheticFunction,
|
2021-05-12 23:48:34 +00:00
|
|
|
Section,
|
2021-02-27 00:09:32 +00:00
|
|
|
};
|
2018-01-28 19:57:01 +00:00
|
|
|
|
2021-05-14 23:25:04 +00:00
|
|
|
StringRef name;
|
|
|
|
StringRef debugName;
|
|
|
|
|
|
|
|
StringRef getName() const { return name; }
|
|
|
|
StringRef getDebugName() const { return debugName; }
|
|
|
|
Kind kind() const { return (Kind)sectionKind; }
|
2018-01-28 19:57:01 +00:00
|
|
|
|
2021-05-14 23:25:04 +00:00
|
|
|
uint32_t getSize() const;
|
|
|
|
uint32_t getInputSize() const;
|
2018-01-10 01:13:34 +00:00
|
|
|
|
2021-05-14 23:25:04 +00:00
|
|
|
void writeTo(uint8_t *buf) const;
|
2021-02-27 00:09:32 +00:00
|
|
|
void relocate(uint8_t *buf) const;
|
2018-01-10 19:22:42 +00:00
|
|
|
|
2018-01-23 01:25:56 +00:00
|
|
|
ArrayRef<WasmRelocation> getRelocations() const { return relocations; }
|
2018-08-22 17:50:51 +00:00
|
|
|
void setRelocations(ArrayRef<WasmRelocation> rs) { relocations = rs; }
|
2018-01-10 19:22:42 +00:00
|
|
|
|
2021-05-12 23:48:34 +00:00
|
|
|
// Translate an offset into the input chunk to an offset in the output
|
2021-05-14 23:25:04 +00:00
|
|
|
// section.
|
|
|
|
uint64_t getOffset(uint64_t offset) const;
|
2021-05-12 23:48:34 +00:00
|
|
|
// Translate an offset into the input chunk into an offset into the output
|
|
|
|
// chunk. For data segments (InputSegment) this will return and offset into
|
|
|
|
// the output segment. For MergeInputChunk, this will return an offset into
|
|
|
|
// the parent merged chunk. For other chunk types this is no-op and we just
|
|
|
|
// return unmodified offset.
|
|
|
|
uint64_t getChunkOffset(uint64_t offset) const;
|
2021-05-14 23:25:04 +00:00
|
|
|
uint64_t getVA(uint64_t offset = 0) const;
|
|
|
|
|
|
|
|
uint32_t getComdat() const { return comdat; }
|
2018-03-14 15:45:11 +00:00
|
|
|
StringRef getComdatName() const;
|
2021-05-14 23:25:04 +00:00
|
|
|
uint32_t getInputSectionOffset() const { return inputSectionOffset; }
|
2018-01-12 22:25:17 +00:00
|
|
|
|
2019-07-10 09:10:01 +00:00
|
|
|
size_t getNumRelocations() const { return relocations.size(); }
|
2018-02-20 04:26:26 +00:00
|
|
|
void writeRelocations(llvm::raw_ostream &os) const;
|
2021-05-14 23:25:04 +00:00
|
|
|
void generateRelocationCode(raw_ostream &os) const;
|
|
|
|
|
2021-09-08 08:53:13 +00:00
|
|
|
bool isTLS() const { return flags & llvm::wasm::WASM_SEG_FLAG_TLS; }
|
2018-02-20 04:26:26 +00:00
|
|
|
|
2018-01-31 23:48:14 +00:00
|
|
|
ObjFile *file;
|
2020-03-27 23:52:27 +00:00
|
|
|
OutputSection *outputSec = nullptr;
|
2021-05-14 23:25:04 +00:00
|
|
|
uint32_t comdat = UINT32_MAX;
|
|
|
|
uint32_t inputSectionOffset = 0;
|
|
|
|
uint32_t alignment;
|
|
|
|
uint32_t flags;
|
|
|
|
|
|
|
|
// Only applies to data segments.
|
|
|
|
uint32_t outputSegmentOffset = 0;
|
|
|
|
const OutputSegment *outputSeg = nullptr;
|
2021-02-26 23:22:23 +00:00
|
|
|
|
|
|
|
// After assignAddresses is called, this represents the offset from
|
|
|
|
// the beginning of the output section this chunk was assigned to.
|
|
|
|
int32_t outSecOff = 0;
|
2018-01-31 01:45:47 +00:00
|
|
|
|
2021-05-14 23:25:04 +00:00
|
|
|
uint8_t sectionKind : 3;
|
|
|
|
|
2018-02-13 20:29:38 +00:00
|
|
|
// Signals that the section is part of the output. The garbage collector,
|
|
|
|
// and COMDAT handling can set a sections' Live bit.
|
|
|
|
// If GC is disabled, all sections start out as live by default.
|
2018-01-31 01:45:47 +00:00
|
|
|
unsigned live : 1;
|
2018-01-10 19:22:42 +00:00
|
|
|
|
2019-06-07 06:00:46 +00:00
|
|
|
// Signals the chunk was discarded by COMDAT handling.
|
|
|
|
unsigned discarded : 1;
|
|
|
|
|
2018-01-10 19:22:42 +00:00
|
|
|
protected:
|
2021-05-14 23:25:04 +00:00
|
|
|
InputChunk(ObjFile *f, Kind k, StringRef name, uint32_t alignment = 0,
|
|
|
|
uint32_t flags = 0)
|
|
|
|
: name(name), file(f), alignment(alignment), flags(flags), sectionKind(k),
|
2022-01-27 23:47:14 +00:00
|
|
|
live(!config->gcSections), discarded(false) {}
|
2021-05-14 23:25:04 +00:00
|
|
|
ArrayRef<uint8_t> data() const { return rawData; }
|
|
|
|
uint64_t getTombstone() const;
|
2018-01-10 01:13:34 +00:00
|
|
|
|
2018-08-22 17:50:51 +00:00
|
|
|
ArrayRef<WasmRelocation> relocations;
|
2021-05-14 23:25:04 +00:00
|
|
|
ArrayRef<uint8_t> rawData;
|
2018-01-10 01:13:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// Represents a WebAssembly data segment which can be included as part of
|
|
|
|
// an output data segments. Note that in WebAssembly, unlike ELF and other
|
2020-01-06 18:21:05 +00:00
|
|
|
// formats, used the term "data segment" to refer to the continuous regions of
|
2018-01-10 01:13:34 +00:00
|
|
|
// memory that make on the data section. See:
|
|
|
|
// https://webassembly.github.io/spec/syntax/modules.html#syntax-data
|
|
|
|
//
|
|
|
|
// For example, by default, clang will produce a separate data section for
|
|
|
|
// each global variable.
|
|
|
|
class InputSegment : public InputChunk {
|
|
|
|
public:
|
2021-05-12 23:48:34 +00:00
|
|
|
InputSegment(const WasmSegment &seg, ObjFile *f)
|
|
|
|
: InputChunk(f, InputChunk::DataSegment, seg.Data.Name,
|
|
|
|
seg.Data.Alignment, seg.Data.LinkingFlags),
|
2021-05-14 23:25:04 +00:00
|
|
|
segment(seg) {
|
2021-05-12 23:48:34 +00:00
|
|
|
rawData = segment.Data.Content;
|
|
|
|
comdat = segment.Data.Comdat;
|
|
|
|
inputSectionOffset = segment.SectionOffset;
|
2018-08-22 17:50:51 +00:00
|
|
|
}
|
2021-02-27 00:09:32 +00:00
|
|
|
|
2021-05-14 23:25:04 +00:00
|
|
|
static bool classof(const InputChunk *c) { return c->kind() == DataSegment; }
|
2021-02-27 00:09:32 +00:00
|
|
|
|
2021-02-27 00:09:32 +00:00
|
|
|
protected:
|
2021-05-12 23:48:34 +00:00
|
|
|
const WasmSegment &segment;
|
2021-02-27 00:09:32 +00:00
|
|
|
};
|
|
|
|
|
2021-05-14 23:25:04 +00:00
|
|
|
class SyntheticMergedChunk;
|
2021-02-27 00:09:32 +00:00
|
|
|
|
|
|
|
// Merge segment handling copied from lld/ELF/InputSection.h. Keep in sync
|
|
|
|
// where possible.
|
|
|
|
|
2021-05-14 23:25:04 +00:00
|
|
|
// SectionPiece represents a piece of splittable segment contents.
|
2021-02-27 00:09:32 +00:00
|
|
|
// We allocate a lot of these and binary search on them. This means that they
|
|
|
|
// have to be as compact as possible, which is why we don't store the size (can
|
|
|
|
// be found by looking at the next one).
|
2021-05-14 23:25:04 +00:00
|
|
|
struct SectionPiece {
|
|
|
|
SectionPiece(size_t off, uint32_t hash, bool live)
|
2021-02-27 00:09:32 +00:00
|
|
|
: inputOff(off), live(live || !config->gcSections), hash(hash >> 1) {}
|
|
|
|
|
|
|
|
uint32_t inputOff;
|
|
|
|
uint32_t live : 1;
|
|
|
|
uint32_t hash : 31;
|
|
|
|
uint64_t outputOff = 0;
|
|
|
|
};
|
|
|
|
|
2021-05-14 23:25:04 +00:00
|
|
|
static_assert(sizeof(SectionPiece) == 16, "SectionPiece is too big");
|
2021-02-27 00:09:32 +00:00
|
|
|
|
|
|
|
// This corresponds segments marked as WASM_SEG_FLAG_STRINGS.
|
2021-05-14 23:25:04 +00:00
|
|
|
class MergeInputChunk : public InputChunk {
|
2021-02-27 00:09:32 +00:00
|
|
|
public:
|
2021-05-12 23:48:34 +00:00
|
|
|
MergeInputChunk(const WasmSegment &seg, ObjFile *f)
|
|
|
|
: InputChunk(f, Merge, seg.Data.Name, seg.Data.Alignment,
|
|
|
|
seg.Data.LinkingFlags) {
|
|
|
|
rawData = seg.Data.Content;
|
|
|
|
comdat = seg.Data.Comdat;
|
|
|
|
inputSectionOffset = seg.SectionOffset;
|
|
|
|
}
|
|
|
|
|
|
|
|
MergeInputChunk(const WasmSection &s, ObjFile *f)
|
|
|
|
: InputChunk(f, Merge, s.Name, 0, llvm::wasm::WASM_SEG_FLAG_STRINGS) {
|
|
|
|
assert(s.Type == llvm::wasm::WASM_SEC_CUSTOM);
|
|
|
|
comdat = s.Comdat;
|
|
|
|
rawData = s.Content;
|
2021-02-27 00:09:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static bool classof(const InputChunk *s) { return s->kind() == Merge; }
|
|
|
|
void splitIntoPieces();
|
2021-05-10 22:27:45 +00:00
|
|
|
|
2021-02-27 00:09:32 +00:00
|
|
|
// Translate an offset in the input section to an offset in the parent
|
|
|
|
// MergeSyntheticSection.
|
|
|
|
uint64_t getParentOffset(uint64_t offset) const;
|
|
|
|
|
|
|
|
// Splittable sections are handled as a sequence of data
|
|
|
|
// rather than a single large blob of data.
|
2021-05-14 23:25:04 +00:00
|
|
|
std::vector<SectionPiece> pieces;
|
2021-02-27 00:09:32 +00:00
|
|
|
|
|
|
|
// Returns I'th piece's data. This function is very hot when
|
|
|
|
// string merging is enabled, so we want to inline.
|
|
|
|
LLVM_ATTRIBUTE_ALWAYS_INLINE
|
|
|
|
llvm::CachedHashStringRef getData(size_t i) const {
|
|
|
|
size_t begin = pieces[i].inputOff;
|
|
|
|
size_t end =
|
|
|
|
(pieces.size() - 1 == i) ? data().size() : pieces[i + 1].inputOff;
|
|
|
|
return {toStringRef(data().slice(begin, end - begin)), pieces[i].hash};
|
|
|
|
}
|
|
|
|
|
|
|
|
// Returns the SectionPiece at a given input section offset.
|
2021-05-14 23:25:04 +00:00
|
|
|
SectionPiece *getSectionPiece(uint64_t offset);
|
|
|
|
const SectionPiece *getSectionPiece(uint64_t offset) const {
|
|
|
|
return const_cast<MergeInputChunk *>(this)->getSectionPiece(offset);
|
2021-02-27 00:09:32 +00:00
|
|
|
}
|
|
|
|
|
2021-05-14 23:25:04 +00:00
|
|
|
SyntheticMergedChunk *parent = nullptr;
|
2021-02-27 00:09:32 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void splitStrings(ArrayRef<uint8_t> a);
|
|
|
|
};
|
|
|
|
|
2021-05-14 23:25:04 +00:00
|
|
|
// SyntheticMergedChunk is a class that allows us to put mergeable
|
2021-02-27 00:09:32 +00:00
|
|
|
// sections with different attributes in a single output sections. To do that we
|
2021-05-14 23:25:04 +00:00
|
|
|
// put them into SyntheticMergedChunk synthetic input sections which are
|
2021-02-27 00:09:32 +00:00
|
|
|
// attached to regular output sections.
|
2021-05-14 23:25:04 +00:00
|
|
|
class SyntheticMergedChunk : public InputChunk {
|
2021-02-27 00:09:32 +00:00
|
|
|
public:
|
2021-05-14 23:25:04 +00:00
|
|
|
SyntheticMergedChunk(StringRef name, uint32_t alignment, uint32_t flags)
|
|
|
|
: InputChunk(nullptr, InputChunk::MergedChunk, name, alignment, flags),
|
|
|
|
builder(llvm::StringTableBuilder::RAW, 1ULL << alignment) {}
|
2021-02-27 00:09:32 +00:00
|
|
|
|
|
|
|
static bool classof(const InputChunk *c) {
|
2021-05-14 23:25:04 +00:00
|
|
|
return c->kind() == InputChunk::MergedChunk;
|
2021-02-27 00:09:32 +00:00
|
|
|
}
|
|
|
|
|
2021-05-14 23:25:04 +00:00
|
|
|
void addMergeChunk(MergeInputChunk *ms) {
|
|
|
|
comdat = ms->getComdat();
|
2021-02-27 00:09:32 +00:00
|
|
|
ms->parent = this;
|
2021-05-14 23:25:04 +00:00
|
|
|
chunks.push_back(ms);
|
2021-02-27 00:09:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void finalizeContents();
|
|
|
|
|
|
|
|
llvm::StringTableBuilder builder;
|
2021-05-14 23:25:04 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
std::vector<MergeInputChunk *> chunks;
|
2018-01-10 01:13:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// Represents a single wasm function within and input file. These are
|
|
|
|
// combined to create the final output CODE section.
|
|
|
|
class InputFunction : public InputChunk {
|
|
|
|
public:
|
2018-03-07 13:28:16 +00:00
|
|
|
InputFunction(const WasmSignature &s, const WasmFunction *func, ObjFile *f)
|
2021-05-14 23:25:04 +00:00
|
|
|
: InputChunk(f, InputChunk::Function, func->SymbolName), signature(s),
|
|
|
|
function(func), exportName(func && func->ExportName.hasValue()
|
|
|
|
? (*func->ExportName).str()
|
|
|
|
: llvm::Optional<std::string>()) {
|
|
|
|
inputSectionOffset = function->CodeSectionOffset;
|
|
|
|
rawData =
|
|
|
|
file->codeSection->Content.slice(inputSectionOffset, function->Size);
|
|
|
|
debugName = function->DebugName;
|
|
|
|
comdat = function->Comdat;
|
|
|
|
}
|
|
|
|
|
|
|
|
InputFunction(StringRef name, const WasmSignature &s)
|
|
|
|
: InputChunk(nullptr, InputChunk::Function, name), signature(s) {}
|
2018-01-28 19:57:01 +00:00
|
|
|
|
2018-01-28 19:57:02 +00:00
|
|
|
static bool classof(const InputChunk *c) {
|
2018-03-09 16:43:05 +00:00
|
|
|
return c->kind() == InputChunk::Function ||
|
|
|
|
c->kind() == InputChunk::SyntheticFunction;
|
2018-01-28 19:57:02 +00:00
|
|
|
}
|
2018-01-10 01:13:34 +00:00
|
|
|
|
2019-12-21 05:44:24 +00:00
|
|
|
llvm::Optional<StringRef> getExportName() const {
|
2020-10-01 00:21:57 +00:00
|
|
|
return exportName.hasValue() ? llvm::Optional<StringRef>(*exportName)
|
|
|
|
: llvm::Optional<StringRef>();
|
2019-11-05 18:15:56 +00:00
|
|
|
}
|
2020-10-01 00:21:57 +00:00
|
|
|
void setExportName(std::string exportName) { this->exportName = exportName; }
|
2018-05-04 23:14:42 +00:00
|
|
|
uint32_t getFunctionInputOffset() const { return getInputSectionOffset(); }
|
2018-05-15 22:27:50 +00:00
|
|
|
uint32_t getFunctionCodeOffset() const { return function->CodeOffset; }
|
2018-03-12 19:56:23 +00:00
|
|
|
uint32_t getFunctionIndex() const { return functionIndex.getValue(); }
|
|
|
|
bool hasFunctionIndex() const { return functionIndex.hasValue(); }
|
|
|
|
void setFunctionIndex(uint32_t index);
|
2018-01-24 21:45:25 +00:00
|
|
|
uint32_t getTableIndex() const { return tableIndex.getValue(); }
|
|
|
|
bool hasTableIndex() const { return tableIndex.hasValue(); }
|
|
|
|
void setTableIndex(uint32_t index);
|
2021-05-14 23:25:04 +00:00
|
|
|
void writeCompressed(uint8_t *buf) const;
|
2018-01-10 01:13:34 +00:00
|
|
|
|
2018-05-18 23:28:05 +00:00
|
|
|
// The size of a given input function can depend on the values of the
|
|
|
|
// LEB relocations within it. This finalizeContents method is called after
|
2020-01-06 18:21:05 +00:00
|
|
|
// all the symbol values have be calculated but before getSize() is ever
|
2018-05-18 23:28:05 +00:00
|
|
|
// called.
|
|
|
|
void calculateSize();
|
|
|
|
|
2018-01-10 01:13:34 +00:00
|
|
|
const WasmSignature &signature;
|
|
|
|
|
2021-05-14 23:25:04 +00:00
|
|
|
uint32_t getCompressedSize() const {
|
|
|
|
assert(compressedSize);
|
|
|
|
return compressedSize;
|
2018-01-13 00:22:00 +00:00
|
|
|
}
|
2018-05-18 23:28:05 +00:00
|
|
|
|
2018-01-12 18:35:13 +00:00
|
|
|
const WasmFunction *function;
|
2021-05-14 23:25:04 +00:00
|
|
|
|
|
|
|
protected:
|
2020-10-01 00:21:57 +00:00
|
|
|
llvm::Optional<std::string> exportName;
|
2018-03-12 19:56:23 +00:00
|
|
|
llvm::Optional<uint32_t> functionIndex;
|
2018-01-24 21:45:25 +00:00
|
|
|
llvm::Optional<uint32_t> tableIndex;
|
2018-05-18 23:28:05 +00:00
|
|
|
uint32_t compressedFuncSize = 0;
|
|
|
|
uint32_t compressedSize = 0;
|
2018-01-10 01:13:34 +00:00
|
|
|
};
|
|
|
|
|
2018-01-12 18:35:13 +00:00
|
|
|
class SyntheticFunction : public InputFunction {
|
|
|
|
public:
|
2018-04-20 17:09:18 +00:00
|
|
|
SyntheticFunction(const WasmSignature &s, StringRef name,
|
|
|
|
StringRef debugName = {})
|
2021-05-14 23:25:04 +00:00
|
|
|
: InputFunction(name, s) {
|
2018-03-09 16:43:05 +00:00
|
|
|
sectionKind = InputChunk::SyntheticFunction;
|
2021-05-14 23:25:04 +00:00
|
|
|
this->debugName = debugName;
|
2018-03-09 16:43:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static bool classof(const InputChunk *c) {
|
|
|
|
return c->kind() == InputChunk::SyntheticFunction;
|
|
|
|
}
|
2018-01-17 20:19:04 +00:00
|
|
|
|
2021-05-14 23:25:04 +00:00
|
|
|
void setBody(ArrayRef<uint8_t> body) { rawData = body; }
|
2018-01-12 18:35:13 +00:00
|
|
|
};
|
|
|
|
|
2018-04-10 16:12:49 +00:00
|
|
|
// Represents a single Wasm Section within an input file.
|
|
|
|
class InputSection : public InputChunk {
|
|
|
|
public:
|
2018-04-12 20:31:35 +00:00
|
|
|
InputSection(const WasmSection &s, ObjFile *f)
|
2021-05-14 23:25:04 +00:00
|
|
|
: InputChunk(f, InputChunk::Section, s.Name),
|
|
|
|
tombstoneValue(getTombstoneForSection(s.Name)), section(s) {
|
2018-04-12 20:31:35 +00:00
|
|
|
assert(section.Type == llvm::wasm::WASM_SEC_CUSTOM);
|
2021-05-14 23:25:04 +00:00
|
|
|
comdat = section.Comdat;
|
|
|
|
rawData = section.Content;
|
2018-04-12 20:31:35 +00:00
|
|
|
}
|
2018-04-10 16:12:49 +00:00
|
|
|
|
2021-05-14 23:25:04 +00:00
|
|
|
static bool classof(const InputChunk *c) {
|
|
|
|
return c->kind() == InputChunk::Section;
|
|
|
|
}
|
2018-04-10 16:12:49 +00:00
|
|
|
|
2021-05-14 23:25:04 +00:00
|
|
|
const uint64_t tombstoneValue;
|
2018-04-10 16:12:49 +00:00
|
|
|
|
2021-05-14 23:25:04 +00:00
|
|
|
protected:
|
2020-12-02 00:01:33 +00:00
|
|
|
static uint64_t getTombstoneForSection(StringRef name);
|
2018-04-10 16:12:49 +00:00
|
|
|
const WasmSection §ion;
|
|
|
|
};
|
|
|
|
|
2018-01-10 01:13:34 +00:00
|
|
|
} // namespace wasm
|
2018-02-19 22:29:48 +00:00
|
|
|
|
|
|
|
std::string toString(const wasm::InputChunk *);
|
2019-03-29 22:56:39 +00:00
|
|
|
StringRef relocTypeToString(uint8_t relocType);
|
|
|
|
|
2018-01-10 01:13:34 +00:00
|
|
|
} // namespace lld
|
|
|
|
|
|
|
|
#endif // LLD_WASM_INPUT_CHUNKS_H
|