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 addGlobal(SymbolBody *Body);
370 void addLocal(SymbolBody *Body);
371 StringTableSection<ELFT> &getStrTabSec() const { return StrTabSec; }
372 unsigned getNumSymbols() const { return Symbols.size() + 1; }
373 size_t getSymbolIndex(SymbolBody *Body);
375 ArrayRef<SymbolTableEntry> getSymbols() const { return Symbols; }
377 static const OutputSectionBase *getOutputSection(SymbolBody *Sym);
380 void writeLocalSymbols(uint8_t *&Buf);
381 void writeGlobalSymbols(uint8_t *Buf);
383 // A vector of symbols and their string table offsets.
384 std::vector<SymbolTableEntry> Symbols;
386 StringTableSection<ELFT> &StrTabSec;
388 unsigned NumLocals = 0;
391 // Outputs GNU Hash section. For detailed explanation see:
392 // https://blogs.oracle.com/ali/entry/gnu_hash_elf_sections
393 template <class ELFT>
394 class GnuHashTableSection final : public SyntheticSection<ELFT> {
395 typedef typename ELFT::Off Elf_Off;
396 typedef typename ELFT::Word Elf_Word;
397 typedef typename ELFT::uint uintX_t;
400 GnuHashTableSection();
401 void finalize() override;
402 void writeTo(uint8_t *Buf) override;
403 size_t getSize() const override { return this->Size; }
405 // Adds symbols to the hash table.
406 // Sorts the input to satisfy GNU hash section requirements.
407 void addSymbols(std::vector<SymbolTableEntry> &Symbols);
410 static unsigned calcNBuckets(unsigned NumHashed);
411 static unsigned calcMaskWords(unsigned NumHashed);
413 void writeHeader(uint8_t *&Buf);
414 void writeBloomFilter(uint8_t *&Buf);
415 void writeHashTable(uint8_t *Buf);
423 std::vector<SymbolData> Symbols;
431 template <class ELFT>
432 class HashTableSection final : public SyntheticSection<ELFT> {
433 typedef typename ELFT::Word Elf_Word;
437 void finalize() override;
438 void writeTo(uint8_t *Buf) override;
439 size_t getSize() const override { return this->Size; }
445 template <class ELFT> class PltSection final : public SyntheticSection<ELFT> {
448 void writeTo(uint8_t *Buf) override;
449 size_t getSize() const override;
450 void addEntry(SymbolBody &Sym);
451 bool empty() const override { return Entries.empty(); }
454 std::vector<std::pair<const SymbolBody *, unsigned>> Entries;
457 // The IpltSection is a variant of Plt for recording entries for GNU Ifunc
458 // symbols that will be subject to a Target->IRelativeRel
459 // The IpltSection immediately follows the Plt section in the Output Section
460 template <class ELFT> class IpltSection final : public SyntheticSection<ELFT> {
463 void writeTo(uint8_t *Buf) override;
464 size_t getSize() const override;
465 void addEntry(SymbolBody &Sym);
466 bool empty() const override { return Entries.empty(); }
469 std::vector<std::pair<const SymbolBody *, unsigned>> Entries;
472 template <class ELFT>
473 class GdbIndexSection final : public SyntheticSection<ELFT> {
474 typedef typename ELFT::uint uintX_t;
476 const unsigned OffsetTypeSize = 4;
477 const unsigned CuListOffset = 6 * OffsetTypeSize;
478 const unsigned CompilationUnitSize = 16;
479 const unsigned AddressEntrySize = 16 + OffsetTypeSize;
480 const unsigned SymTabEntrySize = 2 * OffsetTypeSize;
484 void finalize() override;
485 void writeTo(uint8_t *Buf) override;
486 size_t getSize() const override;
487 bool empty() const override;
489 // Pairs of [CU Offset, CU length].
490 std::vector<std::pair<uintX_t, uintX_t>> CompilationUnits;
492 llvm::StringTableBuilder StringPool;
494 GdbHashTab SymbolTable;
496 // The CU vector portion of the constant pool.
497 std::vector<std::vector<std::pair<uint32_t, uint8_t>>> CuVectors;
499 std::vector<AddressEntry<ELFT>> AddressArea;
502 void parseDebugSections();
503 void readDwarf(InputSection<ELFT> *I);
505 uint32_t CuTypesOffset;
506 uint32_t SymTabOffset;
507 uint32_t ConstantPoolOffset;
508 uint32_t StringPoolOffset;
510 size_t CuVectorsSize = 0;
511 std::vector<size_t> CuVectorsOffset;
513 bool Finalized = false;
516 // --eh-frame-hdr option tells linker to construct a header for all the
517 // .eh_frame sections. This header is placed to a section named .eh_frame_hdr
518 // and also to a PT_GNU_EH_FRAME segment.
519 // At runtime the unwinder then can find all the PT_GNU_EH_FRAME segments by
520 // calling dl_iterate_phdr.
521 // This section contains a lookup table for quick binary search of FDEs.
522 // Detailed info about internals can be found in Ian Lance Taylor's blog:
523 // http://www.airs.com/blog/archives/460 (".eh_frame")
524 // http://www.airs.com/blog/archives/462 (".eh_frame_hdr")
525 template <class ELFT>
526 class EhFrameHeader final : public SyntheticSection<ELFT> {
527 typedef typename ELFT::uint uintX_t;
531 void writeTo(uint8_t *Buf) override;
532 size_t getSize() const override;
533 void addFde(uint32_t Pc, uint32_t FdeVA);
534 bool empty() const override;
542 std::vector<FdeData> Fdes;
545 // For more information about .gnu.version and .gnu.version_r see:
546 // https://www.akkadia.org/drepper/symbol-versioning
548 // The .gnu.version_d section which has a section type of SHT_GNU_verdef shall
549 // contain symbol version definitions. The number of entries in this section
550 // shall be contained in the DT_VERDEFNUM entry of the .dynamic section.
551 // The section shall contain an array of Elf_Verdef structures, optionally
552 // followed by an array of Elf_Verdaux structures.
553 template <class ELFT>
554 class VersionDefinitionSection final : public SyntheticSection<ELFT> {
555 typedef typename ELFT::Verdef Elf_Verdef;
556 typedef typename ELFT::Verdaux Elf_Verdaux;
559 VersionDefinitionSection();
560 void finalize() override;
561 size_t getSize() const override;
562 void writeTo(uint8_t *Buf) override;
565 void writeOne(uint8_t *Buf, uint32_t Index, StringRef Name, size_t NameOff);
567 unsigned FileDefNameOff;
570 // The .gnu.version section specifies the required version of each symbol in the
571 // dynamic symbol table. It contains one Elf_Versym for each dynamic symbol
572 // table entry. An Elf_Versym is just a 16-bit integer that refers to a version
573 // identifier defined in the either .gnu.version_r or .gnu.version_d section.
574 // The values 0 and 1 are reserved. All other values are used for versions in
575 // the own object or in any of the dependencies.
576 template <class ELFT>
577 class VersionTableSection final : public SyntheticSection<ELFT> {
578 typedef typename ELFT::Versym Elf_Versym;
581 VersionTableSection();
582 void finalize() override;
583 size_t getSize() const override;
584 void writeTo(uint8_t *Buf) override;
585 bool empty() const override;
588 // The .gnu.version_r section defines the version identifiers used by
589 // .gnu.version. It contains a linked list of Elf_Verneed data structures. Each
590 // Elf_Verneed specifies the version requirements for a single DSO, and contains
591 // a reference to a linked list of Elf_Vernaux data structures which define the
592 // mapping from version identifiers to version names.
593 template <class ELFT>
594 class VersionNeedSection final : public SyntheticSection<ELFT> {
595 typedef typename ELFT::Verneed Elf_Verneed;
596 typedef typename ELFT::Vernaux Elf_Vernaux;
598 // A vector of shared files that need Elf_Verneed data structures and the
599 // string table offsets of their sonames.
600 std::vector<std::pair<SharedFile<ELFT> *, size_t>> Needed;
602 // The next available version identifier.
606 VersionNeedSection();
607 void addSymbol(SharedSymbol<ELFT> *SS);
608 void finalize() override;
609 void writeTo(uint8_t *Buf) override;
610 size_t getSize() const override;
611 size_t getNeedNum() const { return Needed.size(); }
612 bool empty() const override;
615 // .MIPS.abiflags section.
616 template <class ELFT>
617 class MipsAbiFlagsSection final : public SyntheticSection<ELFT> {
618 typedef llvm::object::Elf_Mips_ABIFlags<ELFT> Elf_Mips_ABIFlags;
621 static MipsAbiFlagsSection *create();
623 MipsAbiFlagsSection(Elf_Mips_ABIFlags Flags);
624 size_t getSize() const override { return sizeof(Elf_Mips_ABIFlags); }
625 void writeTo(uint8_t *Buf) override;
628 Elf_Mips_ABIFlags Flags;
631 // .MIPS.options section.
632 template <class ELFT>
633 class MipsOptionsSection final : public SyntheticSection<ELFT> {
634 typedef llvm::object::Elf_Mips_Options<ELFT> Elf_Mips_Options;
635 typedef llvm::object::Elf_Mips_RegInfo<ELFT> Elf_Mips_RegInfo;
638 static MipsOptionsSection *create();
640 MipsOptionsSection(Elf_Mips_RegInfo Reginfo);
641 void writeTo(uint8_t *Buf) override;
643 size_t getSize() const override {
644 return sizeof(Elf_Mips_Options) + sizeof(Elf_Mips_RegInfo);
648 Elf_Mips_RegInfo Reginfo;
651 // MIPS .reginfo section.
652 template <class ELFT>
653 class MipsReginfoSection final : public SyntheticSection<ELFT> {
654 typedef llvm::object::Elf_Mips_RegInfo<ELFT> Elf_Mips_RegInfo;
657 static MipsReginfoSection *create();
659 MipsReginfoSection(Elf_Mips_RegInfo Reginfo);
660 size_t getSize() const override { return sizeof(Elf_Mips_RegInfo); }
661 void writeTo(uint8_t *Buf) override;
664 Elf_Mips_RegInfo Reginfo;
667 // This is a MIPS specific section to hold a space within the data segment
668 // of executable file which is pointed to by the DT_MIPS_RLD_MAP entry.
669 // See "Dynamic section" in Chapter 5 in the following document:
670 // ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf
671 template <class ELFT> class MipsRldMapSection : public SyntheticSection<ELFT> {
674 size_t getSize() const override { return sizeof(typename ELFT::uint); }
675 void writeTo(uint8_t *Buf) override;
678 template <class ELFT> class ARMExidxSentinelSection : public SyntheticSection<ELFT> {
680 ARMExidxSentinelSection();
681 size_t getSize() const override { return 8; }
682 void writeTo(uint8_t *Buf) override;
685 template <class ELFT> InputSection<ELFT> *createCommonSection();
686 template <class ELFT> InputSection<ELFT> *createInterpSection();
687 template <class ELFT> MergeInputSection<ELFT> *createCommentSection();
689 // Linker generated sections which can be used as inputs.
690 template <class ELFT> struct In {
691 static InputSection<ELFT> *ARMAttributes;
692 static BuildIdSection<ELFT> *BuildId;
693 static InputSection<ELFT> *Common;
694 static DynamicSection<ELFT> *Dynamic;
695 static StringTableSection<ELFT> *DynStrTab;
696 static SymbolTableSection<ELFT> *DynSymTab;
697 static EhFrameHeader<ELFT> *EhFrameHdr;
698 static GnuHashTableSection<ELFT> *GnuHashTab;
699 static GdbIndexSection<ELFT> *GdbIndex;
700 static GotSection<ELFT> *Got;
701 static MipsGotSection<ELFT> *MipsGot;
702 static GotPltSection<ELFT> *GotPlt;
703 static IgotPltSection<ELFT> *IgotPlt;
704 static HashTableSection<ELFT> *HashTab;
705 static InputSection<ELFT> *Interp;
706 static MipsRldMapSection<ELFT> *MipsRldMap;
707 static PltSection<ELFT> *Plt;
708 static IpltSection<ELFT> *Iplt;
709 static RelocationSection<ELFT> *RelaDyn;
710 static RelocationSection<ELFT> *RelaPlt;
711 static RelocationSection<ELFT> *RelaIplt;
712 static StringTableSection<ELFT> *ShStrTab;
713 static StringTableSection<ELFT> *StrTab;
714 static SymbolTableSection<ELFT> *SymTab;
715 static VersionDefinitionSection<ELFT> *VerDef;
716 static VersionTableSection<ELFT> *VerSym;
717 static VersionNeedSection<ELFT> *VerNeed;
720 template <class ELFT> InputSection<ELFT> *In<ELFT>::ARMAttributes;
721 template <class ELFT> BuildIdSection<ELFT> *In<ELFT>::BuildId;
722 template <class ELFT> InputSection<ELFT> *In<ELFT>::Common;
723 template <class ELFT> DynamicSection<ELFT> *In<ELFT>::Dynamic;
724 template <class ELFT> StringTableSection<ELFT> *In<ELFT>::DynStrTab;
725 template <class ELFT> SymbolTableSection<ELFT> *In<ELFT>::DynSymTab;
726 template <class ELFT> EhFrameHeader<ELFT> *In<ELFT>::EhFrameHdr;
727 template <class ELFT> GdbIndexSection<ELFT> *In<ELFT>::GdbIndex;
728 template <class ELFT> GnuHashTableSection<ELFT> *In<ELFT>::GnuHashTab;
729 template <class ELFT> GotSection<ELFT> *In<ELFT>::Got;
730 template <class ELFT> MipsGotSection<ELFT> *In<ELFT>::MipsGot;
731 template <class ELFT> GotPltSection<ELFT> *In<ELFT>::GotPlt;
732 template <class ELFT> IgotPltSection<ELFT> *In<ELFT>::IgotPlt;
733 template <class ELFT> HashTableSection<ELFT> *In<ELFT>::HashTab;
734 template <class ELFT> InputSection<ELFT> *In<ELFT>::Interp;
735 template <class ELFT> MipsRldMapSection<ELFT> *In<ELFT>::MipsRldMap;
736 template <class ELFT> PltSection<ELFT> *In<ELFT>::Plt;
737 template <class ELFT> IpltSection<ELFT> *In<ELFT>::Iplt;
738 template <class ELFT> RelocationSection<ELFT> *In<ELFT>::RelaDyn;
739 template <class ELFT> RelocationSection<ELFT> *In<ELFT>::RelaPlt;
740 template <class ELFT> RelocationSection<ELFT> *In<ELFT>::RelaIplt;
741 template <class ELFT> StringTableSection<ELFT> *In<ELFT>::ShStrTab;
742 template <class ELFT> StringTableSection<ELFT> *In<ELFT>::StrTab;
743 template <class ELFT> SymbolTableSection<ELFT> *In<ELFT>::SymTab;
744 template <class ELFT> VersionDefinitionSection<ELFT> *In<ELFT>::VerDef;
745 template <class ELFT> VersionTableSection<ELFT> *In<ELFT>::VerSym;
746 template <class ELFT> VersionNeedSection<ELFT> *In<ELFT>::VerNeed;