2015-09-22 08:01:39 +08:00
|
|
|
//===- InputSection.h -------------------------------------------*- C++ -*-===//
|
2015-07-25 05:03:07 +08:00
|
|
|
//
|
|
|
|
// The LLVM Linker
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2015-09-22 08:01:39 +08:00
|
|
|
#ifndef LLD_ELF_INPUT_SECTION_H
|
|
|
|
#define LLD_ELF_INPUT_SECTION_H
|
2015-07-25 05:03:07 +08:00
|
|
|
|
ELF2: Implement --gc-sections.
Section garbage collection is a feature to remove unused sections
from outputs. Unused sections are sections that cannot be reachable
from known GC-root symbols or sections. Naturally the feature is
implemented as a mark-sweep garbage collector.
In this patch, I added Live bit to InputSectionBase. If and only
if Live bit is on, the section will be written to the output.
Starting from GC-root symbols or sections, a new function, markLive(),
visits all reachable sections and sets their Live bits. Writer then
ignores sections whose Live bit is off, so that such sections are
excluded from the output.
This change has small negative impact on performance if you use
the feature because making sections means more work. The time to
link Clang changes from 0.356s to 0.386s, or +8%.
It reduces Clang size from 57,764,984 bytes to 55,296,600 bytes.
That is 4.3% reduction.
http://reviews.llvm.org/D13950
llvm-svn: 251043
2015-10-23 02:49:53 +08:00
|
|
|
#include "Config.h"
|
2016-05-25 04:24:43 +08:00
|
|
|
#include "Relocations.h"
|
2016-07-09 00:10:27 +08:00
|
|
|
#include "Thunks.h"
|
2015-07-25 05:03:07 +08:00
|
|
|
#include "lld/Core/LLVM.h"
|
2016-12-19 11:14:16 +08:00
|
|
|
#include "llvm/ADT/CachedHashString.h"
|
2016-05-24 00:55:43 +08:00
|
|
|
#include "llvm/ADT/DenseSet.h"
|
2016-02-23 11:34:37 +08:00
|
|
|
#include "llvm/ADT/TinyPtrVector.h"
|
2015-07-25 05:03:07 +08:00
|
|
|
#include "llvm/Object/ELF.h"
|
2016-11-18 13:05:43 +08:00
|
|
|
#include <mutex>
|
2015-07-25 05:03:07 +08:00
|
|
|
|
|
|
|
namespace lld {
|
2016-02-28 08:25:54 +08:00
|
|
|
namespace elf {
|
2015-07-25 05:03:07 +08:00
|
|
|
|
2016-08-31 21:28:33 +08:00
|
|
|
class DefinedCommon;
|
2016-04-15 22:41:56 +08:00
|
|
|
class SymbolBody;
|
2016-10-06 02:40:00 +08:00
|
|
|
struct SectionPiece;
|
2016-04-15 22:41:56 +08:00
|
|
|
|
2016-04-04 22:04:16 +08:00
|
|
|
template <class ELFT> class DefinedRegular;
|
2017-02-03 21:06:18 +08:00
|
|
|
template <class ELFT> class MergeSyntheticSection;
|
2015-07-25 05:03:07 +08:00
|
|
|
template <class ELFT> class ObjectFile;
|
2015-08-25 04:06:32 +08:00
|
|
|
template <class ELFT> class OutputSection;
|
2016-11-10 07:23:45 +08:00
|
|
|
class OutputSectionBase;
|
2015-07-25 05:03:07 +08:00
|
|
|
|
2016-09-01 17:55:57 +08:00
|
|
|
// We need non-template input section class to store symbol layout
|
|
|
|
// in linker script parser structures, where we do not have ELFT
|
|
|
|
// template parameter. For each scripted output section symbol we
|
|
|
|
// store pointer to preceding InputSectionData object or nullptr,
|
|
|
|
// if symbol should be placed at the very beginning of the output
|
|
|
|
// section
|
|
|
|
class InputSectionData {
|
|
|
|
public:
|
2016-11-10 17:48:29 +08:00
|
|
|
enum Kind { Regular, EHFrame, Merge, Synthetic, };
|
2016-09-01 17:55:57 +08:00
|
|
|
|
|
|
|
// The garbage collector sets sections' Live bits.
|
|
|
|
// If GC is disabled, all sections are considered live by default.
|
2016-09-12 21:13:53 +08:00
|
|
|
InputSectionData(Kind SectionKind, StringRef Name, ArrayRef<uint8_t> Data,
|
2016-12-20 13:47:55 +08:00
|
|
|
bool Live)
|
|
|
|
: SectionKind(SectionKind), Live(Live), Assigned(false), Name(Name),
|
|
|
|
Data(Data) {}
|
2016-09-01 17:55:57 +08:00
|
|
|
|
2016-09-08 20:33:41 +08:00
|
|
|
private:
|
|
|
|
unsigned SectionKind : 3;
|
|
|
|
|
|
|
|
public:
|
|
|
|
Kind kind() const { return (Kind)SectionKind; }
|
|
|
|
|
2016-11-21 07:15:52 +08:00
|
|
|
unsigned Live : 1; // for garbage collection
|
|
|
|
unsigned Assigned : 1; // for linker script
|
2016-09-08 20:33:41 +08:00
|
|
|
uint32_t Alignment;
|
2016-09-08 22:06:08 +08:00
|
|
|
StringRef Name;
|
2016-09-12 21:13:53 +08:00
|
|
|
ArrayRef<uint8_t> Data;
|
|
|
|
|
2016-10-26 08:54:03 +08:00
|
|
|
template <typename T> llvm::ArrayRef<T> getDataAs() const {
|
|
|
|
size_t S = Data.size();
|
|
|
|
assert(S % sizeof(T) == 0);
|
|
|
|
return llvm::makeArrayRef<T>((const T *)Data.data(), S / sizeof(T));
|
|
|
|
}
|
|
|
|
|
2016-09-08 04:41:19 +08:00
|
|
|
std::vector<Relocation> Relocations;
|
2016-09-01 17:55:57 +08:00
|
|
|
};
|
|
|
|
|
2015-09-22 08:16:19 +08:00
|
|
|
// This corresponds to a section of an input file.
|
2016-09-01 17:55:57 +08:00
|
|
|
template <class ELFT> class InputSectionBase : public InputSectionData {
|
2015-10-20 05:00:02 +08:00
|
|
|
protected:
|
2016-07-07 11:55:55 +08:00
|
|
|
typedef typename ELFT::Chdr Elf_Chdr;
|
2016-04-23 00:39:59 +08:00
|
|
|
typedef typename ELFT::Rel Elf_Rel;
|
|
|
|
typedef typename ELFT::Rela Elf_Rela;
|
2016-03-15 07:16:09 +08:00
|
|
|
typedef typename ELFT::Shdr Elf_Shdr;
|
|
|
|
typedef typename ELFT::Sym Elf_Sym;
|
|
|
|
typedef typename ELFT::uint uintX_t;
|
2015-10-20 05:00:02 +08:00
|
|
|
|
|
|
|
// The file this section is from.
|
|
|
|
ObjectFile<ELFT> *File;
|
2015-08-14 06:21:37 +08:00
|
|
|
|
2016-10-26 20:36:56 +08:00
|
|
|
public:
|
2016-10-26 08:54:03 +08:00
|
|
|
// These corresponds to the fields in Elf_Shdr.
|
|
|
|
uintX_t Flags;
|
2016-11-01 17:17:50 +08:00
|
|
|
uintX_t Offset = 0;
|
2016-10-26 08:54:03 +08:00
|
|
|
uintX_t Entsize;
|
|
|
|
uint32_t Type;
|
|
|
|
uint32_t Link;
|
|
|
|
uint32_t Info;
|
|
|
|
|
2016-09-08 22:06:08 +08:00
|
|
|
InputSectionBase()
|
2016-12-20 13:47:55 +08:00
|
|
|
: InputSectionData(Regular, "", ArrayRef<uint8_t>(), false), Repl(this) {
|
2016-11-10 22:53:24 +08:00
|
|
|
NumRelocations = 0;
|
|
|
|
AreRelocsRela = false;
|
|
|
|
}
|
2016-04-04 22:04:16 +08:00
|
|
|
|
2015-10-20 05:00:02 +08:00
|
|
|
InputSectionBase(ObjectFile<ELFT> *File, const Elf_Shdr *Header,
|
2016-09-08 22:06:08 +08:00
|
|
|
StringRef Name, Kind SectionKind);
|
2016-10-26 08:54:03 +08:00
|
|
|
InputSectionBase(ObjectFile<ELFT> *File, uintX_t Flags, uint32_t Type,
|
|
|
|
uintX_t Entsize, uint32_t Link, uint32_t Info,
|
|
|
|
uintX_t Addralign, ArrayRef<uint8_t> Data, StringRef Name,
|
|
|
|
Kind SectionKind);
|
2016-11-10 07:23:45 +08:00
|
|
|
OutputSectionBase *OutSec = nullptr;
|
ELF2: Implement --gc-sections.
Section garbage collection is a feature to remove unused sections
from outputs. Unused sections are sections that cannot be reachable
from known GC-root symbols or sections. Naturally the feature is
implemented as a mark-sweep garbage collector.
In this patch, I added Live bit to InputSectionBase. If and only
if Live bit is on, the section will be written to the output.
Starting from GC-root symbols or sections, a new function, markLive(),
visits all reachable sections and sets their Live bits. Writer then
ignores sections whose Live bit is off, so that such sections are
excluded from the output.
This change has small negative impact on performance if you use
the feature because making sections means more work. The time to
link Clang changes from 0.356s to 0.386s, or +8%.
It reduces Clang size from 57,764,984 bytes to 55,296,600 bytes.
That is 4.3% reduction.
http://reviews.llvm.org/D13950
llvm-svn: 251043
2015-10-23 02:49:53 +08:00
|
|
|
|
2016-11-10 22:53:24 +08:00
|
|
|
// Relocations that refer to this section.
|
|
|
|
const Elf_Rel *FirstRelocation = nullptr;
|
|
|
|
unsigned NumRelocations : 31;
|
|
|
|
unsigned AreRelocsRela : 1;
|
|
|
|
ArrayRef<Elf_Rel> rels() const {
|
|
|
|
assert(!AreRelocsRela);
|
|
|
|
return llvm::makeArrayRef(FirstRelocation, NumRelocations);
|
|
|
|
}
|
|
|
|
ArrayRef<Elf_Rela> relas() const {
|
|
|
|
assert(AreRelocsRela);
|
|
|
|
return llvm::makeArrayRef(static_cast<const Elf_Rela *>(FirstRelocation),
|
|
|
|
NumRelocations);
|
|
|
|
}
|
|
|
|
|
2016-02-26 02:43:51 +08:00
|
|
|
// This pointer points to the "real" instance of this instance.
|
|
|
|
// Usually Repl == this. However, if ICF merges two sections,
|
|
|
|
// Repl pointer of one section points to another section. So,
|
|
|
|
// if you need to get a pointer to this instance, do not use
|
|
|
|
// this but instead this->Repl.
|
|
|
|
InputSectionBase<ELFT> *Repl;
|
|
|
|
|
2016-11-08 22:47:16 +08:00
|
|
|
// Returns the size of this section (even if this is a common or BSS.)
|
|
|
|
size_t getSize() const;
|
|
|
|
|
2017-02-03 21:06:18 +08:00
|
|
|
OutputSectionBase *getOutputSection() const;
|
|
|
|
|
2015-09-24 23:11:50 +08:00
|
|
|
ObjectFile<ELFT> *getFile() const { return File; }
|
2016-11-09 22:39:20 +08:00
|
|
|
llvm::object::ELFFile<ELFT> getObj() const { return File->getObj(); }
|
2016-06-23 12:33:42 +08:00
|
|
|
uintX_t getOffset(const DefinedRegular<ELFT> &Sym) const;
|
2016-10-10 17:39:26 +08:00
|
|
|
InputSectionBase *getLinkOrderDep() const;
|
2015-11-12 00:50:37 +08:00
|
|
|
// Translate an offset in the input section to an offset in the output
|
|
|
|
// section.
|
2016-06-23 12:33:42 +08:00
|
|
|
uintX_t getOffset(uintX_t Offset) const;
|
2015-11-12 00:50:37 +08:00
|
|
|
|
2016-06-24 19:18:44 +08:00
|
|
|
void uncompress();
|
|
|
|
|
2016-11-26 02:51:53 +08:00
|
|
|
// Returns a source location string. Used to construct an error message.
|
|
|
|
std::string getLocation(uintX_t Offset);
|
|
|
|
|
2016-04-13 09:40:19 +08:00
|
|
|
void relocate(uint8_t *Buf, uint8_t *BufEnd);
|
2015-10-20 05:00:02 +08:00
|
|
|
};
|
|
|
|
|
2016-05-22 08:13:04 +08:00
|
|
|
// SectionPiece represents a piece of splittable section contents.
|
2016-10-20 18:55:58 +08: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) and put the hash in a side table.
|
2016-05-22 08:13:04 +08:00
|
|
|
struct SectionPiece {
|
2016-10-20 18:55:58 +08:00
|
|
|
SectionPiece(size_t Off, bool Live = false)
|
|
|
|
: InputOff(Off), OutputOff(-1), Live(Live || !Config->GcSections) {}
|
2016-05-22 09:15:32 +08:00
|
|
|
|
2016-05-22 08:13:04 +08:00
|
|
|
size_t InputOff;
|
2016-10-20 18:55:58 +08:00
|
|
|
ssize_t OutputOff : 8 * sizeof(ssize_t) - 1;
|
2016-10-20 23:59:08 +08:00
|
|
|
size_t Live : 1;
|
2016-05-22 08:13:04 +08:00
|
|
|
};
|
2016-10-20 18:55:58 +08:00
|
|
|
static_assert(sizeof(SectionPiece) == 2 * sizeof(size_t),
|
|
|
|
"SectionPiece is too big");
|
2016-05-22 08:13:04 +08:00
|
|
|
|
2015-10-20 05:00:02 +08:00
|
|
|
// This corresponds to a SHF_MERGE section of an input file.
|
2016-07-21 21:32:37 +08:00
|
|
|
template <class ELFT> class MergeInputSection : public InputSectionBase<ELFT> {
|
2016-03-15 07:16:09 +08:00
|
|
|
typedef typename ELFT::uint uintX_t;
|
|
|
|
typedef typename ELFT::Sym Elf_Sym;
|
|
|
|
typedef typename ELFT::Shdr Elf_Shdr;
|
2015-10-20 05:00:02 +08:00
|
|
|
|
|
|
|
public:
|
2016-09-08 22:06:08 +08:00
|
|
|
MergeInputSection(ObjectFile<ELFT> *F, const Elf_Shdr *Header,
|
|
|
|
StringRef Name);
|
2016-10-27 02:44:57 +08:00
|
|
|
static bool classof(const InputSectionData *S);
|
2016-05-24 00:55:43 +08:00
|
|
|
void splitIntoPieces();
|
|
|
|
|
|
|
|
// Mark the piece at a given offset live. Used by GC.
|
2016-10-20 07:13:40 +08:00
|
|
|
void markLiveAt(uintX_t Offset) {
|
2016-10-26 20:36:56 +08:00
|
|
|
assert(this->Flags & llvm::ELF::SHF_ALLOC);
|
2016-10-20 07:13:40 +08:00
|
|
|
LiveOffsets.insert(Offset);
|
|
|
|
}
|
2016-05-24 00:55:43 +08:00
|
|
|
|
|
|
|
// Translate an offset in the input section to an offset
|
|
|
|
// in the output section.
|
2016-06-23 12:33:42 +08:00
|
|
|
uintX_t getOffset(uintX_t Offset) const;
|
2016-05-24 00:55:43 +08:00
|
|
|
|
2016-07-21 21:32:37 +08:00
|
|
|
// Splittable sections are handled as a sequence of data
|
|
|
|
// rather than a single large blob of data.
|
|
|
|
std::vector<SectionPiece> Pieces;
|
2016-12-06 10:19:30 +08: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;
|
|
|
|
if (Pieces.size() - 1 == I)
|
|
|
|
End = this->Data.size();
|
|
|
|
else
|
|
|
|
End = Pieces[I + 1].InputOff;
|
|
|
|
|
|
|
|
StringRef S = {(const char *)(this->Data.data() + Begin), End - Begin};
|
|
|
|
return {S, Hashes[I]};
|
|
|
|
}
|
2016-07-21 21:32:37 +08:00
|
|
|
|
|
|
|
// Returns the SectionPiece at a given input section offset.
|
|
|
|
SectionPiece *getSectionPiece(uintX_t Offset);
|
|
|
|
const SectionPiece *getSectionPiece(uintX_t Offset) const;
|
|
|
|
|
2017-02-03 21:06:18 +08:00
|
|
|
// MergeInputSections are aggregated to a synthetic input sections,
|
|
|
|
// and then added to an OutputSection. This pointer points to a
|
|
|
|
// synthetic MergeSyntheticSection which this section belongs to.
|
|
|
|
MergeSyntheticSection<ELFT> *MergeSec = nullptr;
|
|
|
|
|
2016-05-24 00:55:43 +08:00
|
|
|
private:
|
2016-11-26 23:15:11 +08:00
|
|
|
void splitStrings(ArrayRef<uint8_t> A, size_t Size);
|
|
|
|
void splitNonStrings(ArrayRef<uint8_t> A, size_t Size);
|
2016-08-03 12:39:42 +08:00
|
|
|
|
2016-11-18 13:05:43 +08:00
|
|
|
std::vector<uint32_t> Hashes;
|
|
|
|
|
|
|
|
mutable llvm::DenseMap<uintX_t, uintX_t> OffsetMap;
|
|
|
|
mutable std::once_flag InitOffsetMap;
|
|
|
|
|
2016-05-24 00:55:43 +08:00
|
|
|
llvm::DenseSet<uintX_t> LiveOffsets;
|
2015-10-20 05:00:02 +08:00
|
|
|
};
|
|
|
|
|
2016-07-22 04:18:30 +08:00
|
|
|
struct EhSectionPiece : public SectionPiece {
|
2016-11-23 17:45:17 +08:00
|
|
|
EhSectionPiece(size_t Off, InputSectionData *ID, uint32_t Size,
|
|
|
|
unsigned FirstRelocation)
|
|
|
|
: SectionPiece(Off, false), ID(ID), Size(Size),
|
2016-10-06 02:40:00 +08:00
|
|
|
FirstRelocation(FirstRelocation) {}
|
2016-11-23 17:45:17 +08:00
|
|
|
InputSectionData *ID;
|
2016-10-20 18:55:58 +08:00
|
|
|
uint32_t Size;
|
|
|
|
uint32_t size() const { return Size; }
|
|
|
|
|
2016-11-23 17:45:17 +08:00
|
|
|
ArrayRef<uint8_t> data() { return {ID->Data.data() + this->InputOff, Size}; }
|
2016-07-22 04:18:30 +08:00
|
|
|
unsigned FirstRelocation;
|
|
|
|
};
|
|
|
|
|
2015-11-12 03:54:14 +08:00
|
|
|
// This corresponds to a .eh_frame section of an input file.
|
2016-07-21 21:32:37 +08:00
|
|
|
template <class ELFT> class EhInputSection : public InputSectionBase<ELFT> {
|
2015-11-12 03:54:14 +08:00
|
|
|
public:
|
2016-03-15 07:16:09 +08:00
|
|
|
typedef typename ELFT::Shdr Elf_Shdr;
|
|
|
|
typedef typename ELFT::uint uintX_t;
|
2016-09-08 22:06:08 +08:00
|
|
|
EhInputSection(ObjectFile<ELFT> *F, const Elf_Shdr *Header, StringRef Name);
|
2016-10-27 02:44:57 +08:00
|
|
|
static bool classof(const InputSectionData *S);
|
2016-05-23 07:53:00 +08:00
|
|
|
void split();
|
2016-07-22 04:18:30 +08:00
|
|
|
template <class RelTy> void split(ArrayRef<RelTy> Rels);
|
2015-11-12 03:54:14 +08:00
|
|
|
|
2016-07-21 21:32:37 +08:00
|
|
|
// Splittable sections are handled as a sequence of data
|
|
|
|
// rather than a single large blob of data.
|
2016-07-22 04:18:30 +08:00
|
|
|
std::vector<EhSectionPiece> Pieces;
|
2015-11-12 03:54:14 +08:00
|
|
|
};
|
|
|
|
|
2015-10-20 05:00:02 +08:00
|
|
|
// This corresponds to a non SHF_MERGE section of an input file.
|
|
|
|
template <class ELFT> class InputSection : public InputSectionBase<ELFT> {
|
|
|
|
typedef InputSectionBase<ELFT> Base;
|
2016-03-15 07:16:09 +08:00
|
|
|
typedef typename ELFT::Shdr Elf_Shdr;
|
|
|
|
typedef typename ELFT::Rela Elf_Rela;
|
|
|
|
typedef typename ELFT::Rel Elf_Rel;
|
|
|
|
typedef typename ELFT::Sym Elf_Sym;
|
|
|
|
typedef typename ELFT::uint uintX_t;
|
2016-11-10 17:48:29 +08:00
|
|
|
typedef InputSectionData::Kind Kind;
|
2015-10-20 05:00:02 +08:00
|
|
|
|
|
|
|
public:
|
2016-11-10 00:55:07 +08:00
|
|
|
InputSection();
|
2016-10-26 08:54:03 +08:00
|
|
|
InputSection(uintX_t Flags, uint32_t Type, uintX_t Addralign,
|
2016-11-10 17:48:29 +08:00
|
|
|
ArrayRef<uint8_t> Data, StringRef Name,
|
|
|
|
Kind K = InputSectionData::Regular);
|
2016-09-08 22:06:08 +08:00
|
|
|
InputSection(ObjectFile<ELFT> *F, const Elf_Shdr *Header, StringRef Name);
|
2015-10-20 05:00:02 +08:00
|
|
|
|
2016-11-10 00:55:07 +08:00
|
|
|
static InputSection<ELFT> Discarded;
|
|
|
|
|
2015-10-20 05:00:02 +08:00
|
|
|
// Write this section to a mmap'ed file, assuming Buf is pointing to
|
|
|
|
// beginning of the output section.
|
2016-11-08 22:47:16 +08:00
|
|
|
void writeTo(uint8_t *Buf);
|
2015-10-20 05:00:02 +08:00
|
|
|
|
2015-10-15 05:00:23 +08:00
|
|
|
// The offset from beginning of the output sections this section was assigned
|
|
|
|
// to. The writer sets a value.
|
2015-10-15 09:58:40 +08:00
|
|
|
uint64_t OutSecOff = 0;
|
2015-10-15 05:00:23 +08:00
|
|
|
|
2017-02-16 16:41:19 +08:00
|
|
|
// InputSections that are dependent on us (reverse dependency for GC)
|
|
|
|
llvm::TinyPtrVector<InputSectionBase<ELFT> *> DependentSections;
|
2016-10-10 18:10:27 +08:00
|
|
|
|
2016-10-27 02:44:57 +08:00
|
|
|
static bool classof(const InputSectionData *S);
|
2016-02-25 16:23:37 +08:00
|
|
|
|
|
|
|
InputSectionBase<ELFT> *getRelocatedSection();
|
|
|
|
|
2016-04-29 02:42:04 +08:00
|
|
|
template <class RelTy>
|
|
|
|
void relocateNonAlloc(uint8_t *Buf, llvm::ArrayRef<RelTy> Rels);
|
|
|
|
|
2016-11-20 10:39:59 +08:00
|
|
|
// Used by ICF.
|
2016-12-06 02:11:35 +08:00
|
|
|
uint32_t Class[2] = {0, 0};
|
2016-02-26 02:43:51 +08:00
|
|
|
|
|
|
|
// Called by ICF to merge two input sections.
|
|
|
|
void replace(InputSection<ELFT> *Other);
|
|
|
|
|
2016-11-20 10:39:59 +08:00
|
|
|
private:
|
|
|
|
template <class RelTy>
|
|
|
|
void copyRelocations(uint8_t *Buf, llvm::ArrayRef<RelTy> Rels);
|
2015-07-25 05:03:07 +08:00
|
|
|
};
|
|
|
|
|
2016-11-10 00:55:07 +08:00
|
|
|
template <class ELFT> InputSection<ELFT> InputSection<ELFT>::Discarded;
|
2016-02-28 08:25:54 +08:00
|
|
|
} // namespace elf
|
2017-01-06 18:04:08 +08:00
|
|
|
|
|
|
|
template <class ELFT> std::string toString(const elf::InputSectionBase<ELFT> *);
|
2015-07-25 05:03:07 +08:00
|
|
|
} // namespace lld
|
|
|
|
|
|
|
|
#endif
|