blob: a74e7d0869c9114cba77ff06cd7de70fe942bda3 [file] [log] [blame]
Rafael Espindolabeee25e2015-08-14 14:12:54 +00001//===- Symbols.h ------------------------------------------------*- C++ -*-===//
Michael J. Spencer84487f12015-07-24 21:03:07 +00002//
3// The LLVM Linker
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
Rui Ueyama34f29242015-10-13 19:51:57 +00009//
10// All symbols are handled as SymbolBodies regardless of their types.
11// This file defines various types of SymbolBodies.
12//
13// File-scope symbols in ELF objects are the only exception of SymbolBody
14// instantiation. We will never create SymbolBodies for them for performance
15// reason. They are often represented as nullptrs. This is fine for symbol
16// resolution because the symbol table naturally cares only about
17// externally-visible symbols. For relocations, you have to deal with both
18// local and non-local functions, and we have two different functions
19// where we need them.
20//
21//===----------------------------------------------------------------------===//
Michael J. Spencer84487f12015-07-24 21:03:07 +000022
23#ifndef LLD_ELF_SYMBOLS_H
24#define LLD_ELF_SYMBOLS_H
25
Rafael Espindola9d06ab62015-09-22 00:01:39 +000026#include "InputSection.h"
Rafael Espindola832b93f2015-08-24 20:06:32 +000027
Michael J. Spencer84487f12015-07-24 21:03:07 +000028#include "lld/Core/LLVM.h"
Michael J. Spencer1b348a62015-09-04 22:28:10 +000029#include "llvm/Object/Archive.h"
Michael J. Spencer84487f12015-07-24 21:03:07 +000030#include "llvm/Object/ELF.h"
31
32namespace lld {
33namespace elf2 {
34
Michael J. Spencer1b348a62015-09-04 22:28:10 +000035class ArchiveFile;
Michael J. Spencer84487f12015-07-24 21:03:07 +000036class InputFile;
37class SymbolBody;
Michael J. Spencercdae0a42015-07-28 22:58:25 +000038template <class ELFT> class ObjectFile;
Michael J. Spencer658dccd2015-09-18 22:13:25 +000039template <class ELFT> class OutputSection;
Rui Ueyamac7cc6ec2015-10-15 22:27:29 +000040template <class ELFT> class OutputSectionBase;
Rui Ueyama35da9b62015-10-11 20:59:12 +000041template <class ELFT> class SharedFile;
Michael J. Spencer84487f12015-07-24 21:03:07 +000042
Rui Ueyama9ea49c72015-10-07 23:46:11 +000043// Initializes global objects defined in this file.
44// Called at the beginning of main().
45void initSymbols();
46
Rui Ueyamaa4a628f2016-01-13 18:55:39 +000047// Returns a demangled C++ symbol name. If Name is not a mangled
48// name or the system does not provide __cxa_demangle function,
49// it returns the unmodified string.
50std::string demangle(StringRef Name);
51
Michael J. Spencer84487f12015-07-24 21:03:07 +000052// A real symbol object, SymbolBody, is usually accessed indirectly
53// through a Symbol. There's always one Symbol for each symbol name.
54// The resolver updates SymbolBody pointers as it resolves symbols.
55struct Symbol {
Michael J. Spencer84487f12015-07-24 21:03:07 +000056 SymbolBody *Body;
57};
58
59// The base class for real symbol classes.
60class SymbolBody {
61public:
62 enum Kind {
Rafael Espindola84aff152015-09-25 21:20:23 +000063 DefinedFirst,
64 DefinedRegularKind = DefinedFirst,
Rafael Espindola84aff152015-09-25 21:20:23 +000065 SharedKind,
Rafael Espindola4d4b06a2015-12-24 00:47:42 +000066 DefinedElfLast = SharedKind,
Rafael Espindola11191912015-12-24 16:23:37 +000067 DefinedCommonKind,
Rafael Espindola9f77ef02016-02-12 20:54:57 +000068 DefinedBitcodeKind,
Rafael Espindola4d4b06a2015-12-24 00:47:42 +000069 DefinedSyntheticKind,
70 DefinedLast = DefinedSyntheticKind,
Rafael Espindola5d7593b2015-12-22 23:00:50 +000071 UndefinedElfKind,
Rafael Espindola84aff152015-09-25 21:20:23 +000072 UndefinedKind,
73 LazyKind
Michael J. Spencer84487f12015-07-24 21:03:07 +000074 };
75
Michael J. Spencercdae0a42015-07-28 22:58:25 +000076 Kind kind() const { return static_cast<Kind>(SymbolKind); }
Michael J. Spencer84487f12015-07-24 21:03:07 +000077
Rafael Espindola3a63f3f2015-08-28 20:19:34 +000078 bool isWeak() const { return IsWeak; }
Rafael Espindola5d7593b2015-12-22 23:00:50 +000079 bool isUndefined() const {
80 return SymbolKind == UndefinedKind || SymbolKind == UndefinedElfKind;
81 }
Michael J. Spencer1b348a62015-09-04 22:28:10 +000082 bool isDefined() const { return SymbolKind <= DefinedLast; }
Rafael Espindola30e17972015-08-30 23:17:30 +000083 bool isCommon() const { return SymbolKind == DefinedCommonKind; }
Michael J. Spencer1b348a62015-09-04 22:28:10 +000084 bool isLazy() const { return SymbolKind == LazyKind; }
Rafael Espindola18173d42015-09-08 15:50:05 +000085 bool isShared() const { return SymbolKind == SharedKind; }
86 bool isUsedInRegularObj() const { return IsUsedInRegularObj; }
Rui Ueyama61805ec2015-12-17 00:12:03 +000087 bool isTls() const { return IsTls; }
George Rimar5c36e592016-02-02 09:28:53 +000088 bool isFunc() const { return IsFunc; }
Rafael Espindola1bd885a2015-08-14 16:46:28 +000089
Michael J. Spencer84487f12015-07-24 21:03:07 +000090 // Returns the symbol name.
Michael J. Spencercdae0a42015-07-28 22:58:25 +000091 StringRef getName() const { return Name; }
Michael J. Spencer84487f12015-07-24 21:03:07 +000092
Rui Ueyama8f2c4da2015-10-21 18:13:47 +000093 uint8_t getVisibility() const { return Visibility; }
Rafael Espindola78471f02015-09-01 23:12:52 +000094
Rui Ueyama572a6f72016-01-29 01:49:33 +000095 unsigned DynsymIndex = 0;
George Rimar90cd0a82015-12-01 19:20:26 +000096 uint32_t GlobalDynIndex = -1;
Rui Ueyama49c68a72015-10-09 00:42:06 +000097 uint32_t GotIndex = -1;
George Rimar648a2c32015-10-20 08:54:27 +000098 uint32_t GotPltIndex = -1;
Rui Ueyama49c68a72015-10-09 00:42:06 +000099 uint32_t PltIndex = -1;
George Rimar90cd0a82015-12-01 19:20:26 +0000100 bool hasGlobalDynIndex() { return GlobalDynIndex != uint32_t(-1); }
Rafael Espindola5c2310c2015-09-18 14:40:19 +0000101 bool isInGot() const { return GotIndex != -1U; }
Rafael Espindolaeb792732015-09-21 15:11:29 +0000102 bool isInPlt() const { return PltIndex != -1U; }
Rafael Espindolaeb792732015-09-21 15:11:29 +0000103
Rui Ueyamab5a69702016-02-01 21:00:35 +0000104 template <class ELFT>
105 typename llvm::object::ELFFile<ELFT>::uintX_t getVA() const;
106 template <class ELFT>
107 typename llvm::object::ELFFile<ELFT>::uintX_t getGotVA() const;
108 template <class ELFT>
109 typename llvm::object::ELFFile<ELFT>::uintX_t getGotPltVA() const;
110 template <class ELFT>
111 typename llvm::object::ELFFile<ELFT>::uintX_t getPltVA() const;
Rui Ueyama512c61d2016-02-03 00:12:24 +0000112 template <class ELFT>
113 typename llvm::object::ELFFile<ELFT>::uintX_t getSize() const;
Rui Ueyamab5a69702016-02-01 21:00:35 +0000114
Michael J. Spencer84487f12015-07-24 21:03:07 +0000115 // A SymbolBody has a backreference to a Symbol. Originally they are
116 // doubly-linked. A backreference will never change. But the pointer
117 // in the Symbol may be mutated by the resolver. If you have a
118 // pointer P to a SymbolBody and are not sure whether the resolver
119 // has chosen the object among other objects having the same name,
120 // you can access P->Backref->Body to get the resolver's result.
121 void setBackref(Symbol *P) { Backref = P; }
Rui Ueyamae66e0012015-10-07 23:20:23 +0000122 SymbolBody *repl() { return Backref ? Backref->Body : this; }
Rui Ueyamadeb15402016-01-07 17:20:07 +0000123 Symbol *getSymbol() { return Backref; }
Michael J. Spencer84487f12015-07-24 21:03:07 +0000124
125 // Decides which symbol should "win" in the symbol table, this or
126 // the Other. Returns 1 if this wins, -1 if the Other wins, or 0 if
127 // they are duplicate (conflicting) symbols.
Rafael Espindoladaa92a62015-08-31 01:16:19 +0000128 template <class ELFT> int compare(SymbolBody *Other);
Michael J. Spencer84487f12015-07-24 21:03:07 +0000129
130protected:
Igor Kudrin65bddea2015-10-09 09:58:39 +0000131 SymbolBody(Kind K, StringRef Name, bool IsWeak, uint8_t Visibility,
George Rimar5c36e592016-02-02 09:28:53 +0000132 bool IsTls, bool IsFunc)
Rafael Espindolaabebed92016-02-05 15:27:15 +0000133 : SymbolKind(K), IsWeak(IsWeak), Visibility(Visibility),
Rafael Espindolaa0a65f92016-02-09 15:11:01 +0000134 MustBeInDynSym(false), NeedsCopyOrPltAddr(false), IsTls(IsTls),
135 IsFunc(IsFunc), Name(Name) {
Rafael Espindola18173d42015-09-08 15:50:05 +0000136 IsUsedInRegularObj = K != SharedKind && K != LazyKind;
137 }
Michael J. Spencer84487f12015-07-24 21:03:07 +0000138
Michael J. Spencercdae0a42015-07-28 22:58:25 +0000139 const unsigned SymbolKind : 8;
Rafael Espindola8614c562015-10-06 14:33:58 +0000140 unsigned IsWeak : 1;
Rui Ueyama8f2c4da2015-10-21 18:13:47 +0000141 unsigned Visibility : 2;
Rui Ueyama7d332f52015-12-25 06:55:39 +0000142
143 // True if the symbol was used for linking and thus need to be
144 // added to the output file's symbol table. It is usually true,
145 // but if it is a shared symbol that were not referenced by anyone,
146 // it can be false.
Rafael Espindola18173d42015-09-08 15:50:05 +0000147 unsigned IsUsedInRegularObj : 1;
Rui Ueyama7d332f52015-12-25 06:55:39 +0000148
Rafael Espindolaabebed92016-02-05 15:27:15 +0000149public:
Rui Ueyama7d332f52015-12-25 06:55:39 +0000150 // If true, the symbol is added to .dynsym symbol table.
Rafael Espindolaabebed92016-02-05 15:27:15 +0000151 unsigned MustBeInDynSym : 1;
Rui Ueyama7d332f52015-12-25 06:55:39 +0000152
Rafael Espindolaa0a65f92016-02-09 15:11:01 +0000153 // True if the linker has to generate a copy relocation for this shared
154 // symbol or if the symbol should point to its plt entry.
155 unsigned NeedsCopyOrPltAddr : 1;
156
Rafael Espindolaabebed92016-02-05 15:27:15 +0000157protected:
Rui Ueyama61805ec2015-12-17 00:12:03 +0000158 unsigned IsTls : 1;
George Rimar5c36e592016-02-02 09:28:53 +0000159 unsigned IsFunc : 1;
Rafael Espindolaa0a65f92016-02-09 15:11:01 +0000160
Michael J. Spencercdae0a42015-07-28 22:58:25 +0000161 StringRef Name;
Michael J. Spencer84487f12015-07-24 21:03:07 +0000162 Symbol *Backref = nullptr;
163};
164
Rafael Espindola02ce26a2015-12-24 14:22:24 +0000165// The base class for any defined symbols.
Rafael Espindola4d4b06a2015-12-24 00:47:42 +0000166class Defined : public SymbolBody {
167public:
George Rimar5c36e592016-02-02 09:28:53 +0000168 Defined(Kind K, StringRef Name, bool IsWeak, uint8_t Visibility, bool IsTls,
169 bool IsFunction);
Rafael Espindola4d4b06a2015-12-24 00:47:42 +0000170 static bool classof(const SymbolBody *S) { return S->isDefined(); }
171};
172
173// Any defined symbol from an ELF file.
174template <class ELFT> class DefinedElf : public Defined {
Rafael Espindola0e0c1902015-08-27 12:40:06 +0000175protected:
Rafael Espindola88dddf92015-12-21 21:07:31 +0000176 typedef typename llvm::object::ELFFile<ELFT>::Elf_Sym Elf_Sym;
Rafael Espindola0e0c1902015-08-27 12:40:06 +0000177
178public:
Rafael Espindola4d4b06a2015-12-24 00:47:42 +0000179 DefinedElf(Kind K, StringRef N, const Elf_Sym &Sym)
180 : Defined(K, N, Sym.getBinding() == llvm::ELF::STB_WEAK,
George Rimar5c36e592016-02-02 09:28:53 +0000181 Sym.getVisibility(), Sym.getType() == llvm::ELF::STT_TLS,
182 Sym.getType() == llvm::ELF::STT_FUNC),
Rafael Espindola5d7593b2015-12-22 23:00:50 +0000183 Sym(Sym) {}
Rafael Espindola3a63f3f2015-08-28 20:19:34 +0000184
Rafael Espindola5d7593b2015-12-22 23:00:50 +0000185 const Elf_Sym &Sym;
Rafael Espindola4d4b06a2015-12-24 00:47:42 +0000186 static bool classof(const SymbolBody *S) {
187 return S->kind() <= DefinedElfLast;
188 }
Rafael Espindola0e0c1902015-08-27 12:40:06 +0000189};
190
Rafael Espindola9f77ef02016-02-12 20:54:57 +0000191class DefinedBitcode : public Defined {
192public:
193 DefinedBitcode(StringRef Name);
194 static bool classof(const SymbolBody *S);
195};
196
Rafael Espindola11191912015-12-24 16:23:37 +0000197class DefinedCommon : public Defined {
Rafael Espindola51d46902015-08-28 21:26:51 +0000198public:
Rafael Espindola11191912015-12-24 16:23:37 +0000199 DefinedCommon(StringRef N, uint64_t Size, uint64_t Alignment, bool IsWeak,
200 uint8_t Visibility);
Rafael Espindola51d46902015-08-28 21:26:51 +0000201
202 static bool classof(const SymbolBody *S) {
Rafael Espindola1e2967e2015-12-21 20:47:33 +0000203 return S->kind() == SymbolBody::DefinedCommonKind;
Rafael Espindola51d46902015-08-28 21:26:51 +0000204 }
Rafael Espindolace8c9c02015-08-31 22:55:21 +0000205
206 // The output offset of this common symbol in the output bss. Computed by the
207 // writer.
Rui Ueyamae57c4872016-01-05 16:35:43 +0000208 uint64_t OffsetInBss;
Rafael Espindolaf31f9612015-09-01 01:19:12 +0000209
210 // The maximum alignment we have seen for this symbol.
Rafael Espindola11191912015-12-24 16:23:37 +0000211 uint64_t MaxAlignment;
212
213 uint64_t Size;
Rafael Espindola51d46902015-08-28 21:26:51 +0000214};
215
Michael J. Spencer84487f12015-07-24 21:03:07 +0000216// Regular defined symbols read from object file symbol tables.
Rafael Espindola4d4b06a2015-12-24 00:47:42 +0000217template <class ELFT> class DefinedRegular : public DefinedElf<ELFT> {
Rafael Espindola88dddf92015-12-21 21:07:31 +0000218 typedef typename llvm::object::ELFFile<ELFT>::Elf_Sym Elf_Sym;
Rafael Espindolac44d17a2015-08-14 15:10:49 +0000219
Michael J. Spencer84487f12015-07-24 21:03:07 +0000220public:
Rafael Espindolac159c962015-10-19 21:00:02 +0000221 DefinedRegular(StringRef N, const Elf_Sym &Sym,
Rafael Espindola02ce26a2015-12-24 14:22:24 +0000222 InputSectionBase<ELFT> *Section)
Rafael Espindola4d4b06a2015-12-24 00:47:42 +0000223 : DefinedElf<ELFT>(SymbolBody::DefinedRegularKind, N, Sym),
Rafael Espindola1e2967e2015-12-21 20:47:33 +0000224 Section(Section) {}
Michael J. Spencer84487f12015-07-24 21:03:07 +0000225
226 static bool classof(const SymbolBody *S) {
Rafael Espindola1e2967e2015-12-21 20:47:33 +0000227 return S->kind() == SymbolBody::DefinedRegularKind;
Michael J. Spencer84487f12015-07-24 21:03:07 +0000228 }
Michael J. Spencer84487f12015-07-24 21:03:07 +0000229
Rafael Espindola02ce26a2015-12-24 14:22:24 +0000230 // If this is null, the symbol is absolute.
231 InputSectionBase<ELFT> *Section;
Rafael Espindolab13df652015-08-11 17:33:02 +0000232};
233
Rui Ueyama8b75b9a2015-12-17 00:48:16 +0000234// DefinedSynthetic is a class to represent linker-generated ELF symbols.
235// The difference from the regular symbol is that DefinedSynthetic symbols
236// don't belong to any input files or sections. Thus, its constructor
237// takes an output section to calculate output VA, etc.
Rafael Espindola4d4b06a2015-12-24 00:47:42 +0000238template <class ELFT> class DefinedSynthetic : public Defined {
Rafael Espindola0e604f92015-09-25 18:56:53 +0000239public:
Rafael Espindola88dddf92015-12-21 21:07:31 +0000240 typedef typename llvm::object::ELFFile<ELFT>::Elf_Sym Elf_Sym;
Rafael Espindola4d4b06a2015-12-24 00:47:42 +0000241 typedef typename llvm::object::ELFFile<ELFT>::uintX_t uintX_t;
242 DefinedSynthetic(StringRef N, uintX_t Value,
243 OutputSectionBase<ELFT> &Section);
Rafael Espindola0e604f92015-09-25 18:56:53 +0000244
245 static bool classof(const SymbolBody *S) {
Rafael Espindola1e2967e2015-12-21 20:47:33 +0000246 return S->kind() == SymbolBody::DefinedSyntheticKind;
Rafael Espindola0e604f92015-09-25 18:56:53 +0000247 }
248
Rafael Espindola4d4b06a2015-12-24 00:47:42 +0000249 uintX_t Value;
Rui Ueyamac7cc6ec2015-10-15 22:27:29 +0000250 const OutputSectionBase<ELFT> &Section;
Rafael Espindola0e604f92015-09-25 18:56:53 +0000251};
252
Rafael Espindolaf7d45f02015-08-31 01:46:20 +0000253// Undefined symbol.
Rafael Espindola5d7593b2015-12-22 23:00:50 +0000254class Undefined : public SymbolBody {
255 typedef SymbolBody::Kind Kind;
256 bool CanKeepUndefined;
257
258protected:
259 Undefined(Kind K, StringRef N, bool IsWeak, uint8_t Visibility, bool IsTls);
260
261public:
262 Undefined(StringRef N, bool IsWeak, uint8_t Visibility,
263 bool CanKeepUndefined);
264
265 static bool classof(const SymbolBody *S) { return S->isUndefined(); }
266
267 bool canKeepUndefined() const { return CanKeepUndefined; }
268};
269
270template <class ELFT> class UndefinedElf : public Undefined {
Rafael Espindola88dddf92015-12-21 21:07:31 +0000271 typedef typename llvm::object::ELFFile<ELFT>::Elf_Sym Elf_Sym;
Rafael Espindola1bd885a2015-08-14 16:46:28 +0000272
Rafael Espindola76e24ea2015-08-11 17:57:05 +0000273public:
Rafael Espindola5d7593b2015-12-22 23:00:50 +0000274 UndefinedElf(StringRef N, const Elf_Sym &Sym);
275 const Elf_Sym &Sym;
Rafael Espindola5f2c46d2015-12-23 01:06:39 +0000276
277 static bool classof(const SymbolBody *S) {
278 return S->kind() == SymbolBody::UndefinedElfKind;
279 }
Rafael Espindola1bd885a2015-08-14 16:46:28 +0000280};
281
Rafael Espindola4d4b06a2015-12-24 00:47:42 +0000282template <class ELFT> class SharedSymbol : public DefinedElf<ELFT> {
Rafael Espindola88dddf92015-12-21 21:07:31 +0000283 typedef typename llvm::object::ELFFile<ELFT>::Elf_Sym Elf_Sym;
George Rimarbc590fe2015-10-28 16:48:58 +0000284 typedef typename llvm::object::ELFFile<ELFT>::uintX_t uintX_t;
Rafael Espindola18173d42015-09-08 15:50:05 +0000285
286public:
287 static bool classof(const SymbolBody *S) {
Rafael Espindola1e2967e2015-12-21 20:47:33 +0000288 return S->kind() == SymbolBody::SharedKind;
Rafael Espindola18173d42015-09-08 15:50:05 +0000289 }
290
Rui Ueyama35da9b62015-10-11 20:59:12 +0000291 SharedSymbol(SharedFile<ELFT> *F, StringRef Name, const Elf_Sym &Sym)
Rafael Espindola4d4b06a2015-12-24 00:47:42 +0000292 : DefinedElf<ELFT>(SymbolBody::SharedKind, Name, Sym), File(F) {}
Rui Ueyama35da9b62015-10-11 20:59:12 +0000293
294 SharedFile<ELFT> *File;
George Rimarbc590fe2015-10-28 16:48:58 +0000295
Rafael Espindolaa0a65f92016-02-09 15:11:01 +0000296 // OffsetInBss is significant only when needsCopy() is true.
Rui Ueyamae57c4872016-01-05 16:35:43 +0000297 uintX_t OffsetInBss = 0;
Rafael Espindolaa0a65f92016-02-09 15:11:01 +0000298
299 bool needsCopy() const { return this->NeedsCopyOrPltAddr && !this->IsFunc; }
Rafael Espindola18173d42015-09-08 15:50:05 +0000300};
301
Michael J. Spencer1b348a62015-09-04 22:28:10 +0000302// This class represents a symbol defined in an archive file. It is
303// created from an archive file header, and it knows how to load an
304// object file from an archive to replace itself with a defined
305// symbol. If the resolver finds both Undefined and Lazy for
306// the same name, it will ask the Lazy to load a file.
307class Lazy : public SymbolBody {
308public:
309 Lazy(ArchiveFile *F, const llvm::object::Archive::Symbol S)
George Rimar5c36e592016-02-02 09:28:53 +0000310 : SymbolBody(LazyKind, S.getName(), false, llvm::ELF::STV_DEFAULT,
311 /*IsTls*/ false, /*IsFunction*/ false),
Michael J. Spencer1b348a62015-09-04 22:28:10 +0000312 File(F), Sym(S) {}
313
314 static bool classof(const SymbolBody *S) { return S->kind() == LazyKind; }
315
316 // Returns an object file for this symbol, or a nullptr if the file
317 // was already returned.
318 std::unique_ptr<InputFile> getMember();
319
Rafael Espindola8614c562015-10-06 14:33:58 +0000320 void setWeak() { IsWeak = true; }
321 void setUsedInRegularObj() { IsUsedInRegularObj = true; }
322
Michael J. Spencer1b348a62015-09-04 22:28:10 +0000323private:
324 ArchiveFile *File;
325 const llvm::object::Archive::Symbol Sym;
326};
327
Rui Ueyamaa246e0942015-12-25 06:12:18 +0000328// Some linker-generated symbols need to be created as
329// DefinedRegular symbols, so they need Elf_Sym symbols.
330// Here we allocate such Elf_Sym symbols statically.
331template <class ELFT> struct ElfSym {
332 typedef typename llvm::object::ELFFile<ELFT>::Elf_Sym Elf_Sym;
333
Rafael Espindola65e80b92016-01-19 21:19:52 +0000334 // Used to represent an undefined symbol which we don't want to add to the
335 // output file's symbol table. It has weak binding and can be substituted.
336 static Elf_Sym Ignored;
Rui Ueyamaa246e0942015-12-25 06:12:18 +0000337
338 // The content for _end and end symbols.
339 static Elf_Sym End;
340
341 // The content for _gp symbol for MIPS target.
342 static Elf_Sym MipsGp;
343
344 // __rel_iplt_start/__rel_iplt_end for signaling
345 // where R_[*]_IRELATIVE relocations do live.
346 static Elf_Sym RelaIpltStart;
347 static Elf_Sym RelaIpltEnd;
348};
349
Rafael Espindola65e80b92016-01-19 21:19:52 +0000350template <class ELFT> typename ElfSym<ELFT>::Elf_Sym ElfSym<ELFT>::Ignored;
Rui Ueyamaa246e0942015-12-25 06:12:18 +0000351template <class ELFT> typename ElfSym<ELFT>::Elf_Sym ElfSym<ELFT>::End;
352template <class ELFT> typename ElfSym<ELFT>::Elf_Sym ElfSym<ELFT>::MipsGp;
353template <class ELFT>
354typename ElfSym<ELFT>::Elf_Sym ElfSym<ELFT>::RelaIpltStart;
355template <class ELFT> typename ElfSym<ELFT>::Elf_Sym ElfSym<ELFT>::RelaIpltEnd;
356
Michael J. Spencer84487f12015-07-24 21:03:07 +0000357} // namespace elf2
358} // namespace lld
359
360#endif