1 //===- SyntheticSection.h ---------------------------------------*- C++ -*-===//
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLD_ELF_SYNTHETIC_SECTION_H
11 #define LLD_ELF_SYNTHETIC_SECTION_H
14 #include "InputSection.h"
15 #include "llvm/ADT/MapVector.h"
16 #include "llvm/MC/StringTableBuilder.h"
21 template <class ELFT> class SyntheticSection : public InputSection<ELFT> {
22 typedef typename ELFT::uint uintX_t;
25 SyntheticSection(uintX_t Flags, uint32_t Type, uintX_t Addralign,
27 : InputSection<ELFT>(Flags, Type, Addralign, ArrayRef<uint8_t>(), Name,
28 InputSectionData::Synthetic) {
32 virtual ~SyntheticSection() = default;
33 virtual void writeTo(uint8_t *Buf) = 0;
34 virtual size_t getSize() const = 0;
35 virtual void finalize() {}
36 virtual bool empty() const { return false; }
38 uintX_t getVA() const {
39 return this->OutSec ? this->OutSec->Addr + this->OutSecOff : 0;
42 static bool classof(const InputSectionData *D) {
43 return D->kind() == InputSectionData::Synthetic;
47 template <class ELFT> class GotSection final : public SyntheticSection<ELFT> {
48 typedef typename ELFT::uint uintX_t;
52 void writeTo(uint8_t *Buf) override;
53 size_t getSize() const override { return Size; }
54 void finalize() override;
55 bool empty() const override;
57 void addEntry(SymbolBody &Sym);
58 bool addDynTlsEntry(SymbolBody &Sym);
60 uintX_t getGlobalDynAddr(const SymbolBody &B) const;
61 uintX_t getGlobalDynOffset(const SymbolBody &B) const;
63 uintX_t getTlsIndexVA() { return this->getVA() + TlsIndexOff; }
64 uint32_t getTlsIndexOff() const { return TlsIndexOff; }
66 // Flag to force GOT to be in output if we have relocations
67 // that relies on its address.
68 bool HasGotOffRel = false;
71 size_t NumEntries = 0;
72 uint32_t TlsIndexOff = -1;
76 // .note.gnu.build-id section.
77 template <class ELFT> class BuildIdSection : public SyntheticSection<ELFT> {
78 // First 16 bytes are a header.
79 static const unsigned HeaderSize = 16;
83 void writeTo(uint8_t *Buf) override;
84 size_t getSize() const override { return HeaderSize + HashSize; }
85 void writeBuildId(llvm::ArrayRef<uint8_t> Buf);
88 void computeHash(llvm::ArrayRef<uint8_t> Buf,
89 std::function<void(uint8_t *, ArrayRef<uint8_t>)> Hash);
96 class MipsGotSection final : public SyntheticSection<ELFT> {
97 typedef typename ELFT::uint uintX_t;
101 void writeTo(uint8_t *Buf) override;
102 size_t getSize() const override { return Size; }
103 void finalize() override;
104 bool empty() const override;
105 void addEntry(SymbolBody &Sym, uintX_t Addend, RelExpr Expr);
106 bool addDynTlsEntry(SymbolBody &Sym);
108 uintX_t getPageEntryOffset(const SymbolBody &B, uintX_t Addend) const;
109 uintX_t getBodyEntryOffset(const SymbolBody &B, uintX_t Addend) const;
110 uintX_t getGlobalDynOffset(const SymbolBody &B) const;
112 // Returns the symbol which corresponds to the first entry of the global part
113 // of GOT on MIPS platform. It is required to fill up MIPS-specific dynamic
115 // Returns nullptr if the global part is empty.
116 const SymbolBody *getFirstGlobalEntry() const;
118 // Returns the number of entries in the local part of GOT including
119 // the number of reserved entries.
120 unsigned getLocalEntriesNum() const;
122 // Returns offset of TLS part of the MIPS GOT table. This part goes
123 // after 'local' and 'global' entries.
124 uintX_t getTlsOffset() const;
126 uint32_t getTlsIndexOff() const { return TlsIndexOff; }
128 uintX_t getGp() const;
131 // MIPS GOT consists of three parts: local, global and tls. Each part
132 // contains different types of entries. Here is a layout of GOT:
133 // - Header entries |
134 // - Page entries | Local part
135 // - Local entries (16-bit access) |
136 // - Local entries (32-bit access) |
137 // - Normal global entries || Global part
138 // - Reloc-only global entries ||
139 // - TLS entries ||| TLS part
142 // Two entries hold predefined value 0x0 and 0x80000000.
144 // These entries created by R_MIPS_GOT_PAGE relocation and R_MIPS_GOT16
145 // relocation against local symbols. They are initialized by higher 16-bit
146 // of the corresponding symbol's value. So each 64kb of address space
147 // requires a single GOT entry.
148 // Local entries (16-bit access):
149 // These entries created by GOT relocations against global non-preemptible
150 // symbols so dynamic linker is not necessary to resolve the symbol's
151 // values. "16-bit access" means that corresponding relocations address
152 // GOT using 16-bit index. Each unique Symbol-Addend pair has its own
154 // Local entries (32-bit access):
155 // These entries are the same as above but created by relocations which
156 // address GOT using 32-bit index (R_MIPS_GOT_HI16/LO16 etc).
157 // Normal global entries:
158 // These entries created by GOT relocations against preemptible global
159 // symbols. They need to be initialized by dynamic linker and they ordered
160 // exactly as the corresponding entries in the dynamic symbols table.
161 // Reloc-only global entries:
162 // These entries created for symbols that are referenced by dynamic
163 // relocations R_MIPS_REL32. These entries are not accessed with gp-relative
164 // addressing, but MIPS ABI requires that these entries be present in GOT.
166 // Entries created by TLS relocations.
168 // Number of "Header" entries.
169 static const unsigned HeaderEntriesNum = 2;
170 // Number of allocated "Page" entries.
171 uint32_t PageEntriesNum = 0;
172 // Map output sections referenced by MIPS GOT relocations
173 // to the first index of "Page" entries allocated for this section.
174 llvm::SmallMapVector<const OutputSectionBase *, size_t, 16> PageIndexMap;
176 typedef std::pair<const SymbolBody *, uintX_t> GotEntry;
177 typedef std::vector<GotEntry> GotEntries;
178 // Map from Symbol-Addend pair to the GOT index.
179 llvm::DenseMap<GotEntry, size_t> EntryIndexMap;
180 // Local entries (16-bit access).
181 GotEntries LocalEntries;
182 // Local entries (32-bit access).
183 GotEntries LocalEntries32;
185 // Normal and reloc-only global entries.
186 GotEntries GlobalEntries;
189 std::vector<const SymbolBody *> TlsEntries;
191 uint32_t TlsIndexOff = -1;
195 template <class ELFT>
196 class GotPltSection final : public SyntheticSection<ELFT> {
197 typedef typename ELFT::uint uintX_t;
201 void addEntry(SymbolBody &Sym);
202 size_t getSize() const override;
203 void writeTo(uint8_t *Buf) override;
204 bool empty() const override { return Entries.empty(); }
207 std::vector<const SymbolBody *> Entries;
210 // The IgotPltSection is a Got associated with the IpltSection for GNU Ifunc
211 // Symbols that will be relocated by Target->IRelativeRel.
212 // On most Targets the IgotPltSection will immediately follow the GotPltSection
213 // on ARM the IgotPltSection will immediately follow the GotSection.
214 template <class ELFT>
215 class IgotPltSection final : public SyntheticSection<ELFT> {
216 typedef typename ELFT::uint uintX_t;
220 void addEntry(SymbolBody &Sym);
221 size_t getSize() const override;
222 void writeTo(uint8_t *Buf) override;
223 bool empty() const override { return Entries.empty(); }
226 std::vector<const SymbolBody *> Entries;
229 template <class ELFT>
230 class StringTableSection final : public SyntheticSection<ELFT> {
232 typedef typename ELFT::uint uintX_t;
233 StringTableSection(StringRef Name, bool Dynamic);
234 unsigned addString(StringRef S, bool HashIt = true);
235 void writeTo(uint8_t *Buf) override;
236 size_t getSize() const override { return Size; }
237 bool isDynamic() const { return Dynamic; }
242 // ELF string tables start with a NUL byte, so 1.
245 llvm::DenseMap<StringRef, unsigned> StringMap;
246 std::vector<StringRef> Strings;
249 template <class ELFT> class DynamicReloc {
250 typedef typename ELFT::uint uintX_t;
253 DynamicReloc(uint32_t Type, const InputSectionBase<ELFT> *InputSec,
254 uintX_t OffsetInSec, bool UseSymVA, SymbolBody *Sym,
256 : Type(Type), Sym(Sym), InputSec(InputSec), OffsetInSec(OffsetInSec),
257 UseSymVA(UseSymVA), Addend(Addend) {}
259 DynamicReloc(uint32_t Type, const OutputSectionBase *OutputSec,
260 uintX_t OffsetInSec, bool UseSymVA, SymbolBody *Sym,
262 : Type(Type), Sym(Sym), OutputSec(OutputSec), OffsetInSec(OffsetInSec),
263 UseSymVA(UseSymVA), Addend(Addend) {}
265 uintX_t getOffset() const;
266 uintX_t getAddend() const;
267 uint32_t getSymIndex() const;
268 const OutputSectionBase *getOutputSec() const { return OutputSec; }
269 const InputSectionBase<ELFT> *getInputSec() const { return InputSec; }
275 const InputSectionBase<ELFT> *InputSec = nullptr;
276 const OutputSectionBase *OutputSec = nullptr;
282 template <class ELFT>
283 class DynamicSection final : public SyntheticSection<ELFT> {
284 typedef typename ELFT::Dyn Elf_Dyn;
285 typedef typename ELFT::Rel Elf_Rel;
286 typedef typename ELFT::Rela Elf_Rela;
287 typedef typename ELFT::Shdr Elf_Shdr;
288 typedef typename ELFT::Sym Elf_Sym;
289 typedef typename ELFT::uint uintX_t;
291 // The .dynamic section contains information for the dynamic linker.
292 // The section consists of fixed size entries, which consist of
293 // type and value fields. Value are one of plain integers, symbol
294 // addresses, or section addresses. This struct represents the entry.
298 OutputSectionBase *OutSec;
299 InputSection<ELFT> *InSec;
301 const SymbolBody *Sym;
303 enum KindT { SecAddr, SecSize, SymAddr, PlainInt, InSecAddr } Kind;
304 Entry(int32_t Tag, OutputSectionBase *OutSec, KindT Kind = SecAddr)
305 : Tag(Tag), OutSec(OutSec), Kind(Kind) {}
306 Entry(int32_t Tag, InputSection<ELFT> *Sec)
307 : Tag(Tag), InSec(Sec), Kind(InSecAddr) {}
308 Entry(int32_t Tag, uint64_t Val) : Tag(Tag), Val(Val), Kind(PlainInt) {}
309 Entry(int32_t Tag, const SymbolBody *Sym)
310 : Tag(Tag), Sym(Sym), Kind(SymAddr) {}
313 // finalize() fills this vector with the section contents. finalize()
314 // cannot directly create final section contents because when the
315 // function is called, symbol or section addresses are not fixed yet.
316 std::vector<Entry> Entries;
320 void finalize() override;
321 void writeTo(uint8_t *Buf) override;
322 size_t getSize() const override { return Size; }
326 void add(Entry E) { Entries.push_back(E); }
330 template <class ELFT>
331 class RelocationSection final : public SyntheticSection<ELFT> {
332 typedef typename ELFT::Rel Elf_Rel;
333 typedef typename ELFT::Rela Elf_Rela;
334 typedef typename ELFT::uint uintX_t;
337 RelocationSection(StringRef Name, bool Sort);
338 void addReloc(const DynamicReloc<ELFT> &Reloc);
339 unsigned getRelocOffset();
340 void finalize() override;
341 void writeTo(uint8_t *Buf) override;
342 bool empty() const override { return Relocs.empty(); }
343 size_t getSize() const override { return Relocs.size() * this->Entsize; }
344 size_t getRelativeRelocCount() const { return NumRelativeRelocs; }
348 size_t NumRelativeRelocs = 0;
349 std::vector<DynamicReloc<ELFT>> Relocs;
352 struct SymbolTableEntry {
357 template <class ELFT>
358 class SymbolTableSection final : public SyntheticSection<ELFT> {
360 typedef typename ELFT::Shdr Elf_Shdr;
361 typedef typename ELFT::Sym Elf_Sym;
362 typedef typename ELFT::SymRange Elf_Sym_Range;
363 typedef typename ELFT::uint uintX_t;
364 SymbolTableSection(StringTableSection<ELFT> &StrTabSec);
366 void finalize() override;
367 void writeTo(uint8_t *Buf) override;
368 size_t getSize() const override { return getNumSymbols() * sizeof(Elf_Sym); }
369 void addSymbol(SymbolBody *Body);
370 StringTableSection<ELFT> &getStrTabSec() const { return StrTabSec; }
371 unsigned getNumSymbols() const { return NumLocals + Symbols.size() + 1; }
373 ArrayRef<SymbolTableEntry> getSymbols() const { return Symbols; }
375 unsigned NumLocals = 0;
376 StringTableSection<ELFT> &StrTabSec;
379 void writeLocalSymbols(uint8_t *&Buf);
380 void writeGlobalSymbols(uint8_t *Buf);
382 const OutputSectionBase *getOutputSection(SymbolBody *Sym);
384 // A vector of symbols and their string table offsets.
385 std::vector<SymbolTableEntry> Symbols;
388 // Outputs GNU Hash section. For detailed explanation see:
389 // https://blogs.oracle.com/ali/entry/gnu_hash_elf_sections
390 template <class ELFT>
391 class GnuHashTableSection final : public SyntheticSection<ELFT> {
392 typedef typename ELFT::Off Elf_Off;
393 typedef typename ELFT::Word Elf_Word;
394 typedef typename ELFT::uint uintX_t;
397 GnuHashTableSection();
398 void finalize() override;
399 void writeTo(uint8_t *Buf) override;
400 size_t getSize() const override { return this->Size; }
402 // Adds symbols to the hash table.
403 // Sorts the input to satisfy GNU hash section requirements.
404 void addSymbols(std::vector<SymbolTableEntry> &Symbols);
407 static unsigned calcNBuckets(unsigned NumHashed);
408 static unsigned calcMaskWords(unsigned NumHashed);
410 void writeHeader(uint8_t *&Buf);
411 void writeBloomFilter(uint8_t *&Buf);
412 void writeHashTable(uint8_t *Buf);
420 std::vector<SymbolData> Symbols;
428 template <class ELFT>
429 class HashTableSection final : public SyntheticSection<ELFT> {
430 typedef typename ELFT::Word Elf_Word;
434 void finalize() override;
435 void writeTo(uint8_t *Buf) override;
436 size_t getSize() const override { return this->Size; }
442 template <class ELFT> class PltSection final : public SyntheticSection<ELFT> {
445 void writeTo(uint8_t *Buf) override;
446 size_t getSize() const override;
447 void addEntry(SymbolBody &Sym);
448 bool empty() const override { return Entries.empty(); }
451 std::vector<std::pair<const SymbolBody *, unsigned>> Entries;
454 // The IpltSection is a variant of Plt for recording entries for GNU Ifunc
455 // symbols that will be subject to a Target->IRelativeRel
456 // The IpltSection immediately follows the Plt section in the Output Section
457 template <class ELFT> class IpltSection final : public SyntheticSection<ELFT> {
460 void writeTo(uint8_t *Buf) override;
461 size_t getSize() const override;
462 void addEntry(SymbolBody &Sym);
463 bool empty() const override { return Entries.empty(); }
466 std::vector<std::pair<const SymbolBody *, unsigned>> Entries;
469 template <class ELFT>
470 class GdbIndexSection final : public SyntheticSection<ELFT> {
471 typedef typename ELFT::uint uintX_t;
473 const unsigned OffsetTypeSize = 4;
474 const unsigned CuListOffset = 6 * OffsetTypeSize;
475 const unsigned CompilationUnitSize = 16;
476 const unsigned AddressEntrySize = 16 + OffsetTypeSize;
477 const unsigned SymTabEntrySize = 2 * OffsetTypeSize;
481 void finalize() override;
482 void writeTo(uint8_t *Buf) override;
483 size_t getSize() const override;
484 bool empty() const override;
486 // Pairs of [CU Offset, CU length].
487 std::vector<std::pair<uintX_t, uintX_t>> CompilationUnits;
489 llvm::StringTableBuilder StringPool;
491 GdbHashTab SymbolTable;
493 // The CU vector portion of the constant pool.
494 std::vector<std::vector<std::pair<uint32_t, uint8_t>>> CuVectors;
496 std::vector<AddressEntry<ELFT>> AddressArea;
499 void parseDebugSections();
500 void readDwarf(InputSection<ELFT> *I);
502 uint32_t CuTypesOffset;
503 uint32_t SymTabOffset;
504 uint32_t ConstantPoolOffset;
505 uint32_t StringPoolOffset;
507 size_t CuVectorsSize = 0;
508 std::vector<size_t> CuVectorsOffset;
510 bool Finalized = false;
513 // --eh-frame-hdr option tells linker to construct a header for all the
514 // .eh_frame sections. This header is placed to a section named .eh_frame_hdr
515 // and also to a PT_GNU_EH_FRAME segment.
516 // At runtime the unwinder then can find all the PT_GNU_EH_FRAME segments by
517 // calling dl_iterate_phdr.
518 // This section contains a lookup table for quick binary search of FDEs.
519 // Detailed info about internals can be found in Ian Lance Taylor's blog:
520 // http://www.airs.com/blog/archives/460 (".eh_frame")
521 // http://www.airs.com/blog/archives/462 (".eh_frame_hdr")
522 template <class ELFT>
523 class EhFrameHeader final : public SyntheticSection<ELFT> {
524 typedef typename ELFT::uint uintX_t;
528 void writeTo(uint8_t *Buf) override;
529 size_t getSize() const override;
530 void addFde(uint32_t Pc, uint32_t FdeVA);
531 bool empty() const override;
539 std::vector<FdeData> Fdes;
542 // For more information about .gnu.version and .gnu.version_r see:
543 // https://www.akkadia.org/drepper/symbol-versioning
545 // The .gnu.version_d section which has a section type of SHT_GNU_verdef shall
546 // contain symbol version definitions. The number of entries in this section
547 // shall be contained in the DT_VERDEFNUM entry of the .dynamic section.
548 // The section shall contain an array of Elf_Verdef structures, optionally
549 // followed by an array of Elf_Verdaux structures.
550 template <class ELFT>
551 class VersionDefinitionSection final : public SyntheticSection<ELFT> {
552 typedef typename ELFT::Verdef Elf_Verdef;
553 typedef typename ELFT::Verdaux Elf_Verdaux;
556 VersionDefinitionSection();
557 void finalize() override;
558 size_t getSize() const override;
559 void writeTo(uint8_t *Buf) override;
562 void writeOne(uint8_t *Buf, uint32_t Index, StringRef Name, size_t NameOff);
564 unsigned FileDefNameOff;
567 // The .gnu.version section specifies the required version of each symbol in the
568 // dynamic symbol table. It contains one Elf_Versym for each dynamic symbol
569 // table entry. An Elf_Versym is just a 16-bit integer that refers to a version
570 // identifier defined in the either .gnu.version_r or .gnu.version_d section.
571 // The values 0 and 1 are reserved. All other values are used for versions in
572 // the own object or in any of the dependencies.
573 template <class ELFT>
574 class VersionTableSection final : public SyntheticSection<ELFT> {
575 typedef typename ELFT::Versym Elf_Versym;
578 VersionTableSection();
579 void finalize() override;
580 size_t getSize() const override;
581 void writeTo(uint8_t *Buf) override;
582 bool empty() const override;
585 // The .gnu.version_r section defines the version identifiers used by
586 // .gnu.version. It contains a linked list of Elf_Verneed data structures. Each
587 // Elf_Verneed specifies the version requirements for a single DSO, and contains
588 // a reference to a linked list of Elf_Vernaux data structures which define the
589 // mapping from version identifiers to version names.
590 template <class ELFT>
591 class VersionNeedSection final : public SyntheticSection<ELFT> {
592 typedef typename ELFT::Verneed Elf_Verneed;
593 typedef typename ELFT::Vernaux Elf_Vernaux;
595 // A vector of shared files that need Elf_Verneed data structures and the
596 // string table offsets of their sonames.
597 std::vector<std::pair<SharedFile<ELFT> *, size_t>> Needed;
599 // The next available version identifier.
603 VersionNeedSection();
604 void addSymbol(SharedSymbol<ELFT> *SS);
605 void finalize() override;
606 void writeTo(uint8_t *Buf) override;
607 size_t getSize() const override;
608 size_t getNeedNum() const { return Needed.size(); }
609 bool empty() const override;
612 // .MIPS.abiflags section.
613 template <class ELFT>
614 class MipsAbiFlagsSection final : public SyntheticSection<ELFT> {
615 typedef llvm::object::Elf_Mips_ABIFlags<ELFT> Elf_Mips_ABIFlags;
618 static MipsAbiFlagsSection *create();
620 MipsAbiFlagsSection(Elf_Mips_ABIFlags Flags);
621 size_t getSize() const override { return sizeof(Elf_Mips_ABIFlags); }
622 void writeTo(uint8_t *Buf) override;
625 Elf_Mips_ABIFlags Flags;
628 // .MIPS.options section.
629 template <class ELFT>
630 class MipsOptionsSection final : public SyntheticSection<ELFT> {
631 typedef llvm::object::Elf_Mips_Options<ELFT> Elf_Mips_Options;
632 typedef llvm::object::Elf_Mips_RegInfo<ELFT> Elf_Mips_RegInfo;
635 static MipsOptionsSection *create();
637 MipsOptionsSection(Elf_Mips_RegInfo Reginfo);
638 void writeTo(uint8_t *Buf) override;
640 size_t getSize() const override {
641 return sizeof(Elf_Mips_Options) + sizeof(Elf_Mips_RegInfo);
645 Elf_Mips_RegInfo Reginfo;
648 // MIPS .reginfo section.
649 template <class ELFT>
650 class MipsReginfoSection final : public SyntheticSection<ELFT> {
651 typedef llvm::object::Elf_Mips_RegInfo<ELFT> Elf_Mips_RegInfo;
654 static MipsReginfoSection *create();
656 MipsReginfoSection(Elf_Mips_RegInfo Reginfo);
657 size_t getSize() const override { return sizeof(Elf_Mips_RegInfo); }
658 void writeTo(uint8_t *Buf) override;
661 Elf_Mips_RegInfo Reginfo;
664 // This is a MIPS specific section to hold a space within the data segment
665 // of executable file which is pointed to by the DT_MIPS_RLD_MAP entry.
666 // See "Dynamic section" in Chapter 5 in the following document:
667 // ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf
668 template <class ELFT> class MipsRldMapSection : public SyntheticSection<ELFT> {
671 size_t getSize() const override { return sizeof(typename ELFT::uint); }
672 void writeTo(uint8_t *Buf) override;
675 template <class ELFT> class ARMExidxSentinelSection : public SyntheticSection<ELFT> {
677 ARMExidxSentinelSection();
678 size_t getSize() const override { return 8; }
679 void writeTo(uint8_t *Buf) override;
682 template <class ELFT> InputSection<ELFT> *createCommonSection();
683 template <class ELFT> InputSection<ELFT> *createInterpSection();
684 template <class ELFT> MergeInputSection<ELFT> *createCommentSection();
686 // Linker generated sections which can be used as inputs.
687 template <class ELFT> struct In {
688 static InputSection<ELFT> *ARMAttributes;
689 static BuildIdSection<ELFT> *BuildId;
690 static InputSection<ELFT> *Common;
691 static DynamicSection<ELFT> *Dynamic;
692 static StringTableSection<ELFT> *DynStrTab;
693 static SymbolTableSection<ELFT> *DynSymTab;
694 static EhFrameHeader<ELFT> *EhFrameHdr;
695 static GnuHashTableSection<ELFT> *GnuHashTab;
696 static GdbIndexSection<ELFT> *GdbIndex;
697 static GotSection<ELFT> *Got;
698 static MipsGotSection<ELFT> *MipsGot;
699 static GotPltSection<ELFT> *GotPlt;
700 static IgotPltSection<ELFT> *IgotPlt;
701 static HashTableSection<ELFT> *HashTab;
702 static InputSection<ELFT> *Interp;
703 static MipsRldMapSection<ELFT> *MipsRldMap;
704 static PltSection<ELFT> *Plt;
705 static IpltSection<ELFT> *Iplt;
706 static RelocationSection<ELFT> *RelaDyn;
707 static RelocationSection<ELFT> *RelaPlt;
708 static RelocationSection<ELFT> *RelaIplt;
709 static StringTableSection<ELFT> *ShStrTab;
710 static StringTableSection<ELFT> *StrTab;
711 static SymbolTableSection<ELFT> *SymTab;
712 static VersionDefinitionSection<ELFT> *VerDef;
713 static VersionTableSection<ELFT> *VerSym;
714 static VersionNeedSection<ELFT> *VerNeed;
717 template <class ELFT> InputSection<ELFT> *In<ELFT>::ARMAttributes;
718 template <class ELFT> BuildIdSection<ELFT> *In<ELFT>::BuildId;
719 template <class ELFT> InputSection<ELFT> *In<ELFT>::Common;
720 template <class ELFT> DynamicSection<ELFT> *In<ELFT>::Dynamic;
721 template <class ELFT> StringTableSection<ELFT> *In<ELFT>::DynStrTab;
722 template <class ELFT> SymbolTableSection<ELFT> *In<ELFT>::DynSymTab;
723 template <class ELFT> EhFrameHeader<ELFT> *In<ELFT>::EhFrameHdr;
724 template <class ELFT> GdbIndexSection<ELFT> *In<ELFT>::GdbIndex;
725 template <class ELFT> GnuHashTableSection<ELFT> *In<ELFT>::GnuHashTab;
726 template <class ELFT> GotSection<ELFT> *In<ELFT>::Got;
727 template <class ELFT> MipsGotSection<ELFT> *In<ELFT>::MipsGot;
728 template <class ELFT> GotPltSection<ELFT> *In<ELFT>::GotPlt;
729 template <class ELFT> IgotPltSection<ELFT> *In<ELFT>::IgotPlt;
730 template <class ELFT> HashTableSection<ELFT> *In<ELFT>::HashTab;
731 template <class ELFT> InputSection<ELFT> *In<ELFT>::Interp;
732 template <class ELFT> MipsRldMapSection<ELFT> *In<ELFT>::MipsRldMap;
733 template <class ELFT> PltSection<ELFT> *In<ELFT>::Plt;
734 template <class ELFT> IpltSection<ELFT> *In<ELFT>::Iplt;
735 template <class ELFT> RelocationSection<ELFT> *In<ELFT>::RelaDyn;
736 template <class ELFT> RelocationSection<ELFT> *In<ELFT>::RelaPlt;
737 template <class ELFT> RelocationSection<ELFT> *In<ELFT>::RelaIplt;
738 template <class ELFT> StringTableSection<ELFT> *In<ELFT>::ShStrTab;
739 template <class ELFT> StringTableSection<ELFT> *In<ELFT>::StrTab;
740 template <class ELFT> SymbolTableSection<ELFT> *In<ELFT>::SymTab;
741 template <class ELFT> VersionDefinitionSection<ELFT> *In<ELFT>::VerDef;
742 template <class ELFT> VersionTableSection<ELFT> *In<ELFT>::VerSym;
743 template <class ELFT> VersionNeedSection<ELFT> *In<ELFT>::VerNeed;