blob: f73a9c71da0f738f6c7bfcb89cc47ef5fe136fa2 [file] [log] [blame]
Michael J. Spencer84487f12015-07-24 21:03:07 +00001//===- Symbols.cpp --------------------------------------------------------===//
2//
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//===----------------------------------------------------------------------===//
9
10#include "Symbols.h"
Rafael Espindola49a2ca62015-08-06 15:33:19 +000011#include "Error.h"
Michael J. Spencercdae0a42015-07-28 22:58:25 +000012#include "InputFiles.h"
Rui Ueyamab5a69702016-02-01 21:00:35 +000013#include "InputSection.h"
14#include "OutputSections.h"
15#include "Target.h"
Michael J. Spencer84487f12015-07-24 21:03:07 +000016
Michael J. Spencer1b348a62015-09-04 22:28:10 +000017#include "llvm/ADT/STLExtras.h"
Rui Ueyamaa4a628f2016-01-13 18:55:39 +000018#include "llvm/Config/config.h"
19
20#ifdef HAVE_CXXABI_H
21#include <cxxabi.h>
22#endif
Michael J. Spencer1b348a62015-09-04 22:28:10 +000023
24using namespace llvm;
Michael J. Spencer84487f12015-07-24 21:03:07 +000025using namespace llvm::object;
Rafael Espindola78471f02015-09-01 23:12:52 +000026using namespace llvm::ELF;
Michael J. Spencer84487f12015-07-24 21:03:07 +000027
28using namespace lld;
Rafael Espindolae0df00b2016-02-28 00:25:54 +000029using namespace lld::elf;
Michael J. Spencer84487f12015-07-24 21:03:07 +000030
Rui Ueyamab5a69702016-02-01 21:00:35 +000031template <class ELFT>
Rui Ueyama9328b2c2016-03-14 23:16:09 +000032static typename ELFT::uint getSymVA(const SymbolBody &Body,
33 typename ELFT::uint &Addend) {
Rui Ueyama9328b2c2016-03-14 23:16:09 +000034 typedef typename ELFT::uint uintX_t;
Rafael Espindola87d9f102016-03-11 12:19:05 +000035
36 switch (Body.kind()) {
37 case SymbolBody::DefinedSyntheticKind: {
38 auto &D = cast<DefinedSynthetic<ELFT>>(Body);
Simon Atanasyan13f6da12016-03-31 21:26:23 +000039 if (D.Value == DefinedSynthetic<ELFT>::SectionEnd)
40 return D.Section.getVA() + D.Section.getSize();
Rafael Espindola87d9f102016-03-11 12:19:05 +000041 return D.Section.getVA() + D.Value;
Rui Ueyamab5a69702016-02-01 21:00:35 +000042 }
Rafael Espindola87d9f102016-03-11 12:19:05 +000043 case SymbolBody::DefinedRegularKind: {
44 auto &D = cast<DefinedRegular<ELFT>>(Body);
45 InputSectionBase<ELFT> *SC = D.Section;
Rui Ueyamab5a69702016-02-01 21:00:35 +000046
Rafael Espindolaccfe3cb2016-04-04 14:04:16 +000047 // According to the ELF spec reference to a local symbol from outside
48 // the group are not allowed. Unfortunately .eh_frame breaks that rule
49 // and must be treated specially. For now we just replace the symbol with
50 // 0.
51 if (SC == &InputSection<ELFT>::Discarded)
52 return 0;
53
Rui Ueyamab5a69702016-02-01 21:00:35 +000054 // This is an absolute symbol.
55 if (!SC)
Rafael Espindolaccfe3cb2016-04-04 14:04:16 +000056 return D.Value;
Rui Ueyamab5a69702016-02-01 21:00:35 +000057
Rafael Espindolaccfe3cb2016-04-04 14:04:16 +000058 uintX_t Offset = D.Value;
59 if (D.isSection()) {
Rafael Espindola1f5b70f2016-03-11 14:21:37 +000060 Offset += Addend;
61 Addend = 0;
62 }
63 uintX_t VA = SC->OutSec->getVA() + SC->getOffset(Offset);
Rafael Espindolaccfe3cb2016-04-04 14:04:16 +000064 if (D.isTls())
Rafael Espindola1f5b70f2016-03-11 14:21:37 +000065 return VA - Out<ELFT>::TlsPhdr->p_vaddr;
66 return VA;
Rui Ueyamab5a69702016-02-01 21:00:35 +000067 }
Rafael Espindola87d9f102016-03-11 12:19:05 +000068 case SymbolBody::DefinedCommonKind:
69 return Out<ELFT>::Bss->getVA() + cast<DefinedCommon>(Body).OffsetInBss;
70 case SymbolBody::SharedKind: {
71 auto &SS = cast<SharedSymbol<ELFT>>(Body);
72 if (!SS.NeedsCopyOrPltAddr)
Rafael Espindolaa0a65f92016-02-09 15:11:01 +000073 return 0;
Rafael Espindolaccfe3cb2016-04-04 14:04:16 +000074 if (SS.isFunc())
Rafael Espindola87d9f102016-03-11 12:19:05 +000075 return Body.getPltVA<ELFT>();
Rui Ueyama2df72892016-03-13 20:54:38 +000076 return Out<ELFT>::Bss->getVA() + SS.OffsetInBss;
Rui Ueyamab5a69702016-02-01 21:00:35 +000077 }
Peter Collingbourne60976ed2016-04-27 00:05:06 +000078 case SymbolBody::UndefinedKind:
Rui Ueyamab5a69702016-02-01 21:00:35 +000079 return 0;
Rui Ueyamaf8baa662016-04-07 19:24:51 +000080 case SymbolBody::LazyArchiveKind:
81 case SymbolBody::LazyObjectKind:
Peter Collingbournedadcc172016-04-22 18:42:48 +000082 assert(Body.Backref->IsUsedInRegularObj && "lazy symbol reached writer");
Rui Ueyamab5a69702016-02-01 21:00:35 +000083 return 0;
Rafael Espindola87d9f102016-03-11 12:19:05 +000084 case SymbolBody::DefinedBitcodeKind:
Davide Italianof6523ae2016-03-29 02:20:10 +000085 llvm_unreachable("should have been replaced");
Rui Ueyamab5a69702016-02-01 21:00:35 +000086 }
George Rimar777f9632016-03-12 08:31:34 +000087 llvm_unreachable("invalid symbol kind");
Rui Ueyamab5a69702016-02-01 21:00:35 +000088}
89
Rui Ueyamab5792b22016-04-04 19:09:08 +000090SymbolBody::SymbolBody(Kind K, uint32_t NameOffset, uint8_t StOther,
91 uint8_t Type)
Rafael Espindola5e345682016-04-06 14:31:03 +000092 : SymbolKind(K), Type(Type), Binding(STB_LOCAL), StOther(StOther),
93 NameOffset(NameOffset) {
Rafael Espindolaf4765732016-04-06 13:22:41 +000094 init();
95}
96
97SymbolBody::SymbolBody(Kind K, StringRef Name, uint8_t Binding, uint8_t StOther,
98 uint8_t Type)
Rafael Espindola5e345682016-04-06 14:31:03 +000099 : SymbolKind(K), Type(Type), Binding(Binding), StOther(StOther),
Rafael Espindolaf4765732016-04-06 13:22:41 +0000100 Name({Name.data(), Name.size()}) {
101 assert(!isLocal());
102 init();
103}
104
105void SymbolBody::init() {
Rafael Espindola5e345682016-04-06 14:31:03 +0000106 NeedsCopyOrPltAddr = false;
Peter Collingbournedadcc172016-04-22 18:42:48 +0000107 CanOmitFromDynSym = false;
Rafael Espindolaccfe3cb2016-04-04 14:04:16 +0000108}
109
Rui Ueyamac4466602016-03-13 19:48:18 +0000110// Returns true if a symbol can be replaced at load-time by a symbol
111// with the same name defined in other ELF executable or DSO.
112bool SymbolBody::isPreemptible() const {
113 if (isLocal())
114 return false;
115
Peter Collingbourne66ac1d62016-04-22 20:21:26 +0000116 // Shared symbols resolve to the definition in the DSO.
Rui Ueyamac4466602016-03-13 19:48:18 +0000117 if (isShared())
118 return true;
119
Peter Collingbourne66ac1d62016-04-22 20:21:26 +0000120 // That's all that can be preempted in a non-DSO.
Rui Ueyamac4466602016-03-13 19:48:18 +0000121 if (!Config->Shared)
122 return false;
Peter Collingbourne66ac1d62016-04-22 20:21:26 +0000123
Peter Collingbournedbe41872016-04-24 04:29:59 +0000124 // Only symbols that appear in dynsym can be preempted.
125 if (!Backref->includeInDynsym())
Rui Ueyamac4466602016-03-13 19:48:18 +0000126 return false;
Peter Collingbourne66ac1d62016-04-22 20:21:26 +0000127
Peter Collingbournedbe41872016-04-24 04:29:59 +0000128 // Normally only default visibility symbols can be preempted, but -Bsymbolic
129 // means that not even they can be preempted.
130 if (Config->Bsymbolic || (Config->BsymbolicFunctions && isFunc()))
131 return !isDefined();
132 return Backref->Visibility == STV_DEFAULT;
Rui Ueyamac4466602016-03-13 19:48:18 +0000133}
134
Rui Ueyamab5a69702016-02-01 21:00:35 +0000135template <class ELFT>
Rui Ueyama9328b2c2016-03-14 23:16:09 +0000136typename ELFT::uint SymbolBody::getVA(typename ELFT::uint Addend) const {
Rafael Espindola8381c562016-03-17 23:36:19 +0000137 typename ELFT::uint OutVA = getSymVA<ELFT>(*this, Addend);
138 return OutVA + Addend;
Rafael Espindola87d9f102016-03-11 12:19:05 +0000139}
140
Rui Ueyama9328b2c2016-03-14 23:16:09 +0000141template <class ELFT> typename ELFT::uint SymbolBody::getGotVA() const {
Rafael Espindola74031ba2016-04-07 15:20:56 +0000142 return Out<ELFT>::Got->getVA() + getGotOffset<ELFT>();
143}
144
145template <class ELFT> typename ELFT::uint SymbolBody::getGotOffset() const {
146 return (Out<ELFT>::Got->getMipsLocalEntriesNum() + GotIndex) *
147 sizeof(typename ELFT::uint);
Rui Ueyamab5a69702016-02-01 21:00:35 +0000148}
149
Rui Ueyama9328b2c2016-03-14 23:16:09 +0000150template <class ELFT> typename ELFT::uint SymbolBody::getGotPltVA() const {
Rafael Espindola74031ba2016-04-07 15:20:56 +0000151 return Out<ELFT>::GotPlt->getVA() + getGotPltOffset<ELFT>();
152}
153
154template <class ELFT> typename ELFT::uint SymbolBody::getGotPltOffset() const {
155 return GotPltIndex * sizeof(typename ELFT::uint);
Rui Ueyamab5a69702016-02-01 21:00:35 +0000156}
157
Rui Ueyama9328b2c2016-03-14 23:16:09 +0000158template <class ELFT> typename ELFT::uint SymbolBody::getPltVA() const {
Rui Ueyamab5a69702016-02-01 21:00:35 +0000159 return Out<ELFT>::Plt->getVA() + Target->PltZeroSize +
160 PltIndex * Target->PltEntrySize;
161}
162
Simon Atanasyan13f6da12016-03-31 21:26:23 +0000163template <class ELFT> typename ELFT::uint SymbolBody::getThunkVA() const {
164 auto *D = cast<DefinedRegular<ELFT>>(this);
165 auto *S = cast<InputSection<ELFT>>(D->Section);
166 return S->OutSec->getVA() + S->OutSecOff + S->getThunkOff() +
167 ThunkIndex * Target->ThunkSize;
168}
169
Rui Ueyama9328b2c2016-03-14 23:16:09 +0000170template <class ELFT> typename ELFT::uint SymbolBody::getSize() const {
Rafael Espindolaccfe3cb2016-04-04 14:04:16 +0000171 if (const auto *C = dyn_cast<DefinedCommon>(this))
172 return C->Size;
173 if (const auto *DR = dyn_cast<DefinedRegular<ELFT>>(this))
174 return DR->Size;
175 if (const auto *S = dyn_cast<SharedSymbol<ELFT>>(this))
176 return S->Sym.st_size;
Rui Ueyama512c61d2016-02-03 00:12:24 +0000177 return 0;
178}
179
Michael J. Spencer84487f12015-07-24 21:03:07 +0000180// Returns 1, 0 or -1 if this symbol should take precedence
181// over the Other, tie or lose, respectively.
Peter Collingbourned0856a62016-04-05 00:47:58 +0000182int SymbolBody::compare(SymbolBody *Other) {
Michael J. Spencer1b348a62015-09-04 22:28:10 +0000183 assert(!isLazy() && !Other->isLazy());
Rafael Espindola0bc0c022016-01-18 23:54:05 +0000184 std::tuple<bool, bool, bool> L(isDefined(), !isShared(), !isWeak());
185 std::tuple<bool, bool, bool> R(Other->isDefined(), !Other->isShared(),
186 !Other->isWeak());
Rui Ueyamaa7ccb292015-07-27 20:39:01 +0000187
Rui Ueyama8bf71062016-04-22 19:34:59 +0000188 // Compare the two by symbol type.
Rafael Espindola3a63f3f2015-08-28 20:19:34 +0000189 if (L > R)
Peter Collingbourned0856a62016-04-05 00:47:58 +0000190 return -Other->compare(this);
Rafael Espindola3a63f3f2015-08-28 20:19:34 +0000191 if (L != R)
192 return -1;
George Rimar3498c7f2016-03-10 18:49:24 +0000193 if (!isDefined() || isShared() || isWeak())
Rafael Espindola8e5560d2015-09-23 14:23:59 +0000194 return 1;
Rui Ueyama8bf71062016-04-22 19:34:59 +0000195
196 // If both are equal in terms of symbol type, then at least
197 // one of them must be a common symbol. Otherwise, they conflict.
198 auto *A = dyn_cast<DefinedCommon>(this);
199 auto *B = dyn_cast<DefinedCommon>(Other);
200 if (!A && !B)
George Rimar3498c7f2016-03-10 18:49:24 +0000201 return 0;
Rui Ueyama8bf71062016-04-22 19:34:59 +0000202
203 // If both are common, the larger one is chosen.
204 if (A && B) {
205 if (Config->WarnCommon)
206 warning("multiple common of " + A->getName());
207 A->Alignment = B->Alignment = std::max(A->Alignment, B->Alignment);
208 return A->Size < B->Size ? -1 : 1;
209 }
210
211 // Non-common symbols takes precedence over common symbols.
George Rimar34358002016-03-14 09:19:30 +0000212 if (Config->WarnCommon)
213 warning("common " + this->getName() + " is overridden");
Rui Ueyama8bf71062016-04-22 19:34:59 +0000214 return A ? -1 : 1;
Michael J. Spencer84487f12015-07-24 21:03:07 +0000215}
Rafael Espindoladaa92a62015-08-31 01:16:19 +0000216
Rafael Espindolaf9b79a42016-04-06 12:14:31 +0000217Defined::Defined(Kind K, StringRef Name, uint8_t Binding, uint8_t StOther,
Rafael Espindolaccfe3cb2016-04-04 14:04:16 +0000218 uint8_t Type)
Rafael Espindolaf9b79a42016-04-06 12:14:31 +0000219 : SymbolBody(K, Name, Binding, StOther, Type) {}
Rafael Espindolaccfe3cb2016-04-04 14:04:16 +0000220
Rafael Espindolaf9b79a42016-04-06 12:14:31 +0000221Defined::Defined(Kind K, uint32_t NameOffset, uint8_t StOther, uint8_t Type)
222 : SymbolBody(K, NameOffset, StOther, Type) {}
Rafael Espindola4d4b06a2015-12-24 00:47:42 +0000223
Rafael Espindolaf9b79a42016-04-06 12:14:31 +0000224DefinedBitcode::DefinedBitcode(StringRef Name, bool IsWeak, uint8_t StOther)
Rafael Espindolaccfe3cb2016-04-04 14:04:16 +0000225 : Defined(DefinedBitcodeKind, Name, IsWeak ? STB_WEAK : STB_GLOBAL,
Rafael Espindolaf9b79a42016-04-06 12:14:31 +0000226 StOther, 0 /* Type */) {}
Rafael Espindola9f77ef02016-02-12 20:54:57 +0000227
228bool DefinedBitcode::classof(const SymbolBody *S) {
229 return S->kind() == DefinedBitcodeKind;
230}
231
Peter Collingbourne60976ed2016-04-27 00:05:06 +0000232Undefined::Undefined(StringRef Name, uint8_t Binding, uint8_t StOther,
Rui Ueyama62ee16f2016-04-28 00:26:54 +0000233 uint8_t Type, bool IsBitcode)
234 : SymbolBody(SymbolBody::UndefinedKind, Name, Binding, StOther, Type) {
Peter Collingbourne60976ed2016-04-27 00:05:06 +0000235 this->IsUndefinedBitcode = IsBitcode;
236}
Rafael Espindola5d7593b2015-12-22 23:00:50 +0000237
Rui Ueyama62ee16f2016-04-28 00:26:54 +0000238Undefined::Undefined(uint32_t NameOffset, uint8_t StOther, uint8_t Type)
239 : SymbolBody(SymbolBody::UndefinedKind, NameOffset, StOther, Type) {
Peter Collingbourne60976ed2016-04-27 00:05:06 +0000240 this->IsUndefinedBitcode = false;
Rafael Espindolaccfe3cb2016-04-04 14:04:16 +0000241}
Rafael Espindola5d7593b2015-12-22 23:00:50 +0000242
Rafael Espindola4d4b06a2015-12-24 00:47:42 +0000243template <typename ELFT>
244DefinedSynthetic<ELFT>::DefinedSynthetic(StringRef N, uintX_t Value,
Peter Collingbournef6e9b4e2016-04-13 16:57:28 +0000245 OutputSectionBase<ELFT> &Section)
246 : Defined(SymbolBody::DefinedSyntheticKind, N, STB_GLOBAL, STV_HIDDEN,
Davide Italiano255730c2016-03-04 01:55:28 +0000247 0 /* Type */),
Rafael Espindola4d4b06a2015-12-24 00:47:42 +0000248 Value(Value), Section(Section) {}
249
Rafael Espindola11191912015-12-24 16:23:37 +0000250DefinedCommon::DefinedCommon(StringRef N, uint64_t Size, uint64_t Alignment,
Rafael Espindolaf9b79a42016-04-06 12:14:31 +0000251 uint8_t Binding, uint8_t StOther, uint8_t Type)
252 : Defined(SymbolBody::DefinedCommonKind, N, Binding, StOther, Type),
Rui Ueyama17d69832016-03-10 18:58:53 +0000253 Alignment(Alignment), Size(Size) {}
Rafael Espindola11191912015-12-24 16:23:37 +0000254
Rui Ueyamaf8baa662016-04-07 19:24:51 +0000255std::unique_ptr<InputFile> Lazy::getFile() {
256 if (auto *S = dyn_cast<LazyArchive>(this))
257 return S->getFile();
258 return cast<LazyObject>(this)->getFile();
259}
260
261std::unique_ptr<InputFile> LazyArchive::getFile() {
Michael J. Spencer1b348a62015-09-04 22:28:10 +0000262 MemoryBufferRef MBRef = File->getMember(&Sym);
263
264 // getMember returns an empty buffer if the member was already
265 // read from the library.
266 if (MBRef.getBuffer().empty())
267 return std::unique_ptr<InputFile>(nullptr);
Rui Ueyama71c066d2016-02-02 08:22:41 +0000268 return createObjectFile(MBRef, File->getName());
Michael J. Spencer1b348a62015-09-04 22:28:10 +0000269}
270
Rui Ueyamaf8baa662016-04-07 19:24:51 +0000271std::unique_ptr<InputFile> LazyObject::getFile() {
272 return createObjectFile(MBRef);
273}
274
Rui Ueyamaa4a628f2016-01-13 18:55:39 +0000275// Returns the demangled C++ symbol name for Name.
Rafael Espindolae0df00b2016-02-28 00:25:54 +0000276std::string elf::demangle(StringRef Name) {
Rui Ueyamaa4a628f2016-01-13 18:55:39 +0000277#if !defined(HAVE_CXXABI_H)
278 return Name;
279#else
280 if (!Config->Demangle)
281 return Name;
Rui Ueyama5fa978b2016-01-13 19:40:13 +0000282
Rui Ueyamadf154512016-01-13 22:09:09 +0000283 // __cxa_demangle can be used to demangle strings other than symbol
284 // names which do not necessarily start with "_Z". Name can be
285 // either a C or C++ symbol. Don't call __cxa_demangle if the name
286 // does not look like a C++ symbol name to avoid getting unexpected
287 // result for a C symbol that happens to match a mangled type name.
Rui Ueyama5fa978b2016-01-13 19:40:13 +0000288 if (!Name.startswith("_Z"))
289 return Name;
290
Rui Ueyamaa4a628f2016-01-13 18:55:39 +0000291 char *Buf =
292 abi::__cxa_demangle(Name.str().c_str(), nullptr, nullptr, nullptr);
293 if (!Buf)
294 return Name;
295 std::string S(Buf);
296 free(Buf);
297 return S;
298#endif
299}
300
Peter Collingbournedadcc172016-04-22 18:42:48 +0000301bool Symbol::includeInDynsym() const {
302 if (Visibility != STV_DEFAULT && Visibility != STV_PROTECTED)
Rafael Espindolaae605c12016-04-21 20:35:25 +0000303 return false;
Peter Collingbourned869a042016-04-24 02:31:02 +0000304 return (ExportDynamic && VersionScriptGlobal) || Body->isShared() ||
Peter Collingbournedbe41872016-04-24 04:29:59 +0000305 (Body->isUndefined() && Config->Shared);
Rafael Espindolaae605c12016-04-21 20:35:25 +0000306}
307
Rafael Espindola87d9f102016-03-11 12:19:05 +0000308template uint32_t SymbolBody::template getVA<ELF32LE>(uint32_t) const;
309template uint32_t SymbolBody::template getVA<ELF32BE>(uint32_t) const;
310template uint64_t SymbolBody::template getVA<ELF64LE>(uint64_t) const;
311template uint64_t SymbolBody::template getVA<ELF64BE>(uint64_t) const;
Rui Ueyamab5a69702016-02-01 21:00:35 +0000312
313template uint32_t SymbolBody::template getGotVA<ELF32LE>() const;
314template uint32_t SymbolBody::template getGotVA<ELF32BE>() const;
315template uint64_t SymbolBody::template getGotVA<ELF64LE>() const;
316template uint64_t SymbolBody::template getGotVA<ELF64BE>() const;
317
Rafael Espindola74031ba2016-04-07 15:20:56 +0000318template uint32_t SymbolBody::template getGotOffset<ELF32LE>() const;
319template uint32_t SymbolBody::template getGotOffset<ELF32BE>() const;
320template uint64_t SymbolBody::template getGotOffset<ELF64LE>() const;
321template uint64_t SymbolBody::template getGotOffset<ELF64BE>() const;
322
Rui Ueyamab5a69702016-02-01 21:00:35 +0000323template uint32_t SymbolBody::template getGotPltVA<ELF32LE>() const;
324template uint32_t SymbolBody::template getGotPltVA<ELF32BE>() const;
325template uint64_t SymbolBody::template getGotPltVA<ELF64LE>() const;
326template uint64_t SymbolBody::template getGotPltVA<ELF64BE>() const;
327
Rafael Espindola74031ba2016-04-07 15:20:56 +0000328template uint32_t SymbolBody::template getGotPltOffset<ELF32LE>() const;
329template uint32_t SymbolBody::template getGotPltOffset<ELF32BE>() const;
330template uint64_t SymbolBody::template getGotPltOffset<ELF64LE>() const;
331template uint64_t SymbolBody::template getGotPltOffset<ELF64BE>() const;
332
Rui Ueyamab5a69702016-02-01 21:00:35 +0000333template uint32_t SymbolBody::template getPltVA<ELF32LE>() const;
334template uint32_t SymbolBody::template getPltVA<ELF32BE>() const;
335template uint64_t SymbolBody::template getPltVA<ELF64LE>() const;
336template uint64_t SymbolBody::template getPltVA<ELF64BE>() const;
337
Rui Ueyama512c61d2016-02-03 00:12:24 +0000338template uint32_t SymbolBody::template getSize<ELF32LE>() const;
339template uint32_t SymbolBody::template getSize<ELF32BE>() const;
340template uint64_t SymbolBody::template getSize<ELF64LE>() const;
341template uint64_t SymbolBody::template getSize<ELF64BE>() const;
342
Simon Atanasyan13f6da12016-03-31 21:26:23 +0000343template uint32_t SymbolBody::template getThunkVA<ELF32LE>() const;
344template uint32_t SymbolBody::template getThunkVA<ELF32BE>() const;
345template uint64_t SymbolBody::template getThunkVA<ELF64LE>() const;
346template uint64_t SymbolBody::template getThunkVA<ELF64BE>() const;
347
Rafael Espindolae0df00b2016-02-28 00:25:54 +0000348template class elf::DefinedSynthetic<ELF32LE>;
349template class elf::DefinedSynthetic<ELF32BE>;
350template class elf::DefinedSynthetic<ELF64LE>;
351template class elf::DefinedSynthetic<ELF64BE>;