blob: 89053d15a00733f68d23691d924bd1c12a47021e [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"
Rui Ueyamae8a61022016-11-05 23:05:47 +000015#include "SyntheticSections.h"
Rui Ueyamab5a69702016-02-01 21:00:35 +000016#include "Target.h"
Michael J. Spencer84487f12015-07-24 21:03:07 +000017
Michael J. Spencer1b348a62015-09-04 22:28:10 +000018#include "llvm/ADT/STLExtras.h"
Eugene Leviantc958d8d2016-10-12 08:19:30 +000019#include "llvm/Support/Path.h"
Michael J. Spencer1b348a62015-09-04 22:28:10 +000020
21using namespace llvm;
Michael J. Spencer84487f12015-07-24 21:03:07 +000022using namespace llvm::object;
Rafael Espindola78471f02015-09-01 23:12:52 +000023using namespace llvm::ELF;
Michael J. Spencer84487f12015-07-24 21:03:07 +000024
25using namespace lld;
Rafael Espindolae0df00b2016-02-28 00:25:54 +000026using namespace lld::elf;
Michael J. Spencer84487f12015-07-24 21:03:07 +000027
Rui Ueyamab5a69702016-02-01 21:00:35 +000028template <class ELFT>
Rui Ueyama9328b2c2016-03-14 23:16:09 +000029static typename ELFT::uint getSymVA(const SymbolBody &Body,
30 typename ELFT::uint &Addend) {
Rui Ueyama9328b2c2016-03-14 23:16:09 +000031 typedef typename ELFT::uint uintX_t;
Rafael Espindola87d9f102016-03-11 12:19:05 +000032
33 switch (Body.kind()) {
34 case SymbolBody::DefinedSyntheticKind: {
35 auto &D = cast<DefinedSynthetic<ELFT>>(Body);
Rafael Espindolae08e78d2016-11-09 23:23:45 +000036 const OutputSectionBase *Sec = D.Section;
Peter Collingbourne6a422592016-05-03 01:21:08 +000037 if (!Sec)
38 return D.Value;
Simon Atanasyan13f6da12016-03-31 21:26:23 +000039 if (D.Value == DefinedSynthetic<ELFT>::SectionEnd)
Rafael Espindola04a2e342016-11-09 01:42:41 +000040 return Sec->Addr + Sec->Size;
41 return Sec->Addr + 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 }
Rafael Espindola04a2e342016-11-09 01:42:41 +000063 uintX_t VA = (SC->OutSec ? SC->OutSec->Addr : 0) + SC->getOffset(Offset);
George Rimar6a3b1542016-10-04 08:52:51 +000064 if (D.isTls() && !Config->Relocatable) {
65 if (!Out<ELFT>::TlsPhdr)
66 fatal(getFilename(D.File) +
67 " has a STT_TLS symbol but doesn't have a PT_TLS section");
Rafael Espindola1f5b70f2016-03-11 14:21:37 +000068 return VA - Out<ELFT>::TlsPhdr->p_vaddr;
George Rimar6a3b1542016-10-04 08:52:51 +000069 }
Rafael Espindola1f5b70f2016-03-11 14:21:37 +000070 return VA;
Rui Ueyamab5a69702016-02-01 21:00:35 +000071 }
Rui Ueyama07784902016-08-02 01:35:13 +000072 case SymbolBody::DefinedCommonKind:
Rafael Espindola04a2e342016-11-09 01:42:41 +000073 return In<ELFT>::Common->OutSec->Addr + In<ELFT>::Common->OutSecOff +
Rafael Espindolae7553e42016-08-31 13:28:33 +000074 cast<DefinedCommon>(Body).Offset;
Rafael Espindola87d9f102016-03-11 12:19:05 +000075 case SymbolBody::SharedKind: {
76 auto &SS = cast<SharedSymbol<ELFT>>(Body);
77 if (!SS.NeedsCopyOrPltAddr)
Rafael Espindolaa0a65f92016-02-09 15:11:01 +000078 return 0;
Rafael Espindolaccfe3cb2016-04-04 14:04:16 +000079 if (SS.isFunc())
Rafael Espindola87d9f102016-03-11 12:19:05 +000080 return Body.getPltVA<ELFT>();
Rafael Espindola04a2e342016-11-09 01:42:41 +000081 return Out<ELFT>::Bss->Addr + SS.OffsetInBss;
Rui Ueyamab5a69702016-02-01 21:00:35 +000082 }
Peter Collingbourne60976ed2016-04-27 00:05:06 +000083 case SymbolBody::UndefinedKind:
Rui Ueyamab5a69702016-02-01 21:00:35 +000084 return 0;
Rui Ueyamaf8baa662016-04-07 19:24:51 +000085 case SymbolBody::LazyArchiveKind:
86 case SymbolBody::LazyObjectKind:
Peter Collingbourne4f952702016-05-01 04:55:03 +000087 assert(Body.symbol()->IsUsedInRegularObj && "lazy symbol reached writer");
Rui Ueyamab5a69702016-02-01 21:00:35 +000088 return 0;
89 }
George Rimar777f9632016-03-12 08:31:34 +000090 llvm_unreachable("invalid symbol kind");
Rui Ueyamab5a69702016-02-01 21:00:35 +000091}
92
Rui Ueyamab5792b22016-04-04 19:09:08 +000093SymbolBody::SymbolBody(Kind K, uint32_t NameOffset, uint8_t StOther,
94 uint8_t Type)
Simon Atanasyan41325112016-06-19 21:39:37 +000095 : SymbolKind(K), NeedsCopyOrPltAddr(false), IsLocal(true),
Simon Atanasyanbed04bf2016-10-21 07:22:30 +000096 IsInGlobalMipsGot(false), Is32BitMipsGot(false), Type(Type),
97 StOther(StOther), NameOffset(NameOffset) {}
Rafael Espindolaf4765732016-04-06 13:22:41 +000098
Peter Collingbourne4f952702016-05-01 04:55:03 +000099SymbolBody::SymbolBody(Kind K, StringRef Name, uint8_t StOther, uint8_t Type)
Simon Atanasyan41325112016-06-19 21:39:37 +0000100 : SymbolKind(K), NeedsCopyOrPltAddr(false), IsLocal(false),
Simon Atanasyanbed04bf2016-10-21 07:22:30 +0000101 IsInGlobalMipsGot(false), Is32BitMipsGot(false), Type(Type),
102 StOther(StOther), Name({Name.data(), Name.size()}) {}
Rafael Espindolaccfe3cb2016-04-04 14:04:16 +0000103
George Rimar43651582016-06-28 08:21:10 +0000104StringRef SymbolBody::getName() const {
105 assert(!isLocal());
Rui Ueyama663b8c22016-07-17 17:23:17 +0000106 return StringRef(Name.S, Name.Len);
107}
108
Rui Ueyamac4466602016-03-13 19:48:18 +0000109// Returns true if a symbol can be replaced at load-time by a symbol
110// with the same name defined in other ELF executable or DSO.
111bool SymbolBody::isPreemptible() const {
112 if (isLocal())
113 return false;
114
Rafael Espindola66434562016-05-05 19:41:49 +0000115 // Shared symbols resolve to the definition in the DSO. The exceptions are
116 // symbols with copy relocations (which resolve to .bss) or preempt plt
117 // entries (which resolve to that plt entry).
Rui Ueyamac4466602016-03-13 19:48:18 +0000118 if (isShared())
Rafael Espindola66434562016-05-05 19:41:49 +0000119 return !NeedsCopyOrPltAddr;
Rui Ueyamac4466602016-03-13 19:48:18 +0000120
Peter Collingbourne66ac1d62016-04-22 20:21:26 +0000121 // That's all that can be preempted in a non-DSO.
Rui Ueyamac4466602016-03-13 19:48:18 +0000122 if (!Config->Shared)
123 return false;
Peter Collingbourne66ac1d62016-04-22 20:21:26 +0000124
Peter Collingbournedbe41872016-04-24 04:29:59 +0000125 // Only symbols that appear in dynsym can be preempted.
Peter Collingbourne4f952702016-05-01 04:55:03 +0000126 if (!symbol()->includeInDynsym())
Rui Ueyamac4466602016-03-13 19:48:18 +0000127 return false;
Peter Collingbourne66ac1d62016-04-22 20:21:26 +0000128
Rafael Espindola580d7a12016-07-07 22:50:54 +0000129 // Only default visibility symbols can be preempted.
130 if (symbol()->Visibility != STV_DEFAULT)
131 return false;
132
133 // -Bsymbolic means that definitions are not preempted.
Peter Collingbournedbe41872016-04-24 04:29:59 +0000134 if (Config->Bsymbolic || (Config->BsymbolicFunctions && isFunc()))
135 return !isDefined();
Rafael Espindola580d7a12016-07-07 22:50:54 +0000136 return true;
Rui Ueyamac4466602016-03-13 19:48:18 +0000137}
138
Peter Smithfb05cd92016-07-08 16:10:27 +0000139template <class ELFT> bool SymbolBody::hasThunk() const {
140 if (auto *DR = dyn_cast<DefinedRegular<ELFT>>(this))
141 return DR->ThunkData != nullptr;
142 if (auto *S = dyn_cast<SharedSymbol<ELFT>>(this))
143 return S->ThunkData != nullptr;
144 return false;
145}
146
Rui Ueyamab5a69702016-02-01 21:00:35 +0000147template <class ELFT>
Rui Ueyama9328b2c2016-03-14 23:16:09 +0000148typename ELFT::uint SymbolBody::getVA(typename ELFT::uint Addend) const {
Rafael Espindola8381c562016-03-17 23:36:19 +0000149 typename ELFT::uint OutVA = getSymVA<ELFT>(*this, Addend);
150 return OutVA + Addend;
Rafael Espindola87d9f102016-03-11 12:19:05 +0000151}
152
Rui Ueyama9328b2c2016-03-14 23:16:09 +0000153template <class ELFT> typename ELFT::uint SymbolBody::getGotVA() const {
Eugene Leviantad4439e2016-11-11 11:33:32 +0000154 return In<ELFT>::Got->getVA() + getGotOffset<ELFT>();
Rafael Espindola74031ba2016-04-07 15:20:56 +0000155}
156
157template <class ELFT> typename ELFT::uint SymbolBody::getGotOffset() const {
Rui Ueyama803b1202016-07-13 18:55:14 +0000158 return GotIndex * Target->GotEntrySize;
Rui Ueyamab5a69702016-02-01 21:00:35 +0000159}
160
Rui Ueyama9328b2c2016-03-14 23:16:09 +0000161template <class ELFT> typename ELFT::uint SymbolBody::getGotPltVA() const {
Eugene Leviant41ca3272016-11-10 09:48:29 +0000162 return In<ELFT>::GotPlt->getVA() + getGotPltOffset<ELFT>();
Rafael Espindola74031ba2016-04-07 15:20:56 +0000163}
164
165template <class ELFT> typename ELFT::uint SymbolBody::getGotPltOffset() const {
Rui Ueyama803b1202016-07-13 18:55:14 +0000166 return GotPltIndex * Target->GotPltEntrySize;
Rui Ueyamab5a69702016-02-01 21:00:35 +0000167}
168
Rui Ueyama9328b2c2016-03-14 23:16:09 +0000169template <class ELFT> typename ELFT::uint SymbolBody::getPltVA() const {
Rafael Espindola04a2e342016-11-09 01:42:41 +0000170 return Out<ELFT>::Plt->Addr + Target->PltHeaderSize +
Rui Ueyamab5a69702016-02-01 21:00:35 +0000171 PltIndex * Target->PltEntrySize;
172}
173
Simon Atanasyan13f6da12016-03-31 21:26:23 +0000174template <class ELFT> typename ELFT::uint SymbolBody::getThunkVA() const {
Peter Smithfb05cd92016-07-08 16:10:27 +0000175 if (const auto *DR = dyn_cast<DefinedRegular<ELFT>>(this))
176 return DR->ThunkData->getVA();
177 if (const auto *S = dyn_cast<SharedSymbol<ELFT>>(this))
178 return S->ThunkData->getVA();
179 fatal("getThunkVA() not supported for Symbol class\n");
Simon Atanasyan13f6da12016-03-31 21:26:23 +0000180}
181
Rui Ueyama9328b2c2016-03-14 23:16:09 +0000182template <class ELFT> typename ELFT::uint SymbolBody::getSize() const {
Rafael Espindolae7553e42016-08-31 13:28:33 +0000183 if (const auto *C = dyn_cast<DefinedCommon>(this))
Rafael Espindolaccfe3cb2016-04-04 14:04:16 +0000184 return C->Size;
185 if (const auto *DR = dyn_cast<DefinedRegular<ELFT>>(this))
186 return DR->Size;
187 if (const auto *S = dyn_cast<SharedSymbol<ELFT>>(this))
188 return S->Sym.st_size;
Rui Ueyama512c61d2016-02-03 00:12:24 +0000189 return 0;
190}
191
Peter Collingbourne4f952702016-05-01 04:55:03 +0000192Defined::Defined(Kind K, StringRef Name, uint8_t StOther, uint8_t Type)
193 : SymbolBody(K, Name, StOther, Type) {}
Rafael Espindolaccfe3cb2016-04-04 14:04:16 +0000194
Rafael Espindolaf9b79a42016-04-06 12:14:31 +0000195Defined::Defined(Kind K, uint32_t NameOffset, uint8_t StOther, uint8_t Type)
196 : SymbolBody(K, NameOffset, StOther, Type) {}
Rafael Espindola4d4b06a2015-12-24 00:47:42 +0000197
Simon Atanasyanf967f092016-09-29 12:58:36 +0000198template <class ELFT> bool DefinedRegular<ELFT>::isMipsPIC() const {
199 if (!Section || !isFunc())
200 return false;
201 return (this->StOther & STO_MIPS_MIPS16) == STO_MIPS_PIC ||
202 (Section->getFile()->getObj().getHeader()->e_flags & EF_MIPS_PIC);
203}
204
Rui Ueyama434b5612016-07-17 03:11:46 +0000205Undefined::Undefined(StringRef Name, uint8_t StOther, uint8_t Type,
206 InputFile *File)
207 : SymbolBody(SymbolBody::UndefinedKind, Name, StOther, Type) {
208 this->File = File;
209}
Rafael Espindola5d7593b2015-12-22 23:00:50 +0000210
Rui Ueyama434b5612016-07-17 03:11:46 +0000211Undefined::Undefined(uint32_t NameOffset, uint8_t StOther, uint8_t Type,
212 InputFile *File)
213 : SymbolBody(SymbolBody::UndefinedKind, NameOffset, StOther, Type) {
214 this->File = File;
215}
Rafael Espindola5d7593b2015-12-22 23:00:50 +0000216
Rafael Espindola4d4b06a2015-12-24 00:47:42 +0000217template <typename ELFT>
218DefinedSynthetic<ELFT>::DefinedSynthetic(StringRef N, uintX_t Value,
Eugene Leviantafaa9342016-11-16 09:49:39 +0000219 const OutputSectionBase *Section)
Peter Collingbourne4f952702016-05-01 04:55:03 +0000220 : Defined(SymbolBody::DefinedSyntheticKind, N, STV_HIDDEN, 0 /* Type */),
Rafael Espindola4d4b06a2015-12-24 00:47:42 +0000221 Value(Value), Section(Section) {}
222
Rafael Espindolae7553e42016-08-31 13:28:33 +0000223DefinedCommon::DefinedCommon(StringRef N, uint64_t Size, uint64_t Alignment,
224 uint8_t StOther, uint8_t Type, InputFile *File)
Peter Collingbourne4f952702016-05-01 04:55:03 +0000225 : Defined(SymbolBody::DefinedCommonKind, N, StOther, Type),
Rui Ueyama2a7c1c12016-07-17 17:36:22 +0000226 Alignment(Alignment), Size(Size) {
227 this->File = File;
228}
Rafael Espindola11191912015-12-24 16:23:37 +0000229
Rui Ueyama55518e72016-10-28 20:57:25 +0000230InputFile *Lazy::fetch() {
Rui Ueyamaf8baa662016-04-07 19:24:51 +0000231 if (auto *S = dyn_cast<LazyArchive>(this))
Rui Ueyama55518e72016-10-28 20:57:25 +0000232 return S->fetch();
233 return cast<LazyObject>(this)->fetch();
Rui Ueyamaf8baa662016-04-07 19:24:51 +0000234}
235
Rui Ueyama434b5612016-07-17 03:11:46 +0000236LazyArchive::LazyArchive(ArchiveFile &File,
237 const llvm::object::Archive::Symbol S, uint8_t Type)
238 : Lazy(LazyArchiveKind, S.getName(), Type), Sym(S) {
239 this->File = &File;
240}
241
242LazyObject::LazyObject(StringRef Name, LazyObjectFile &File, uint8_t Type)
243 : Lazy(LazyObjectKind, Name, Type) {
244 this->File = &File;
245}
246
Rui Ueyama55518e72016-10-28 20:57:25 +0000247InputFile *LazyArchive::fetch() {
Davide Italianobcdd6c62016-10-12 19:35:54 +0000248 std::pair<MemoryBufferRef, uint64_t> MBInfo = file()->getMember(&Sym);
Michael J. Spencer1b348a62015-09-04 22:28:10 +0000249
250 // getMember returns an empty buffer if the member was already
251 // read from the library.
Davide Italianobcdd6c62016-10-12 19:35:54 +0000252 if (MBInfo.first.getBuffer().empty())
Rui Ueyama38dbd3e2016-09-14 00:05:51 +0000253 return nullptr;
Rui Ueyama55518e72016-10-28 20:57:25 +0000254 return createObjectFile(MBInfo.first, file()->getName(), MBInfo.second);
Michael J. Spencer1b348a62015-09-04 22:28:10 +0000255}
256
Rui Ueyama55518e72016-10-28 20:57:25 +0000257InputFile *LazyObject::fetch() {
Rui Ueyama434b5612016-07-17 03:11:46 +0000258 MemoryBufferRef MBRef = file()->getBuffer();
Rafael Espindola65c65ce2016-06-14 21:56:36 +0000259 if (MBRef.getBuffer().empty())
Rui Ueyama38dbd3e2016-09-14 00:05:51 +0000260 return nullptr;
Rui Ueyama55518e72016-10-28 20:57:25 +0000261 return createObjectFile(MBRef);
Rui Ueyamaf8baa662016-04-07 19:24:51 +0000262}
263
Peter Collingbournedadcc172016-04-22 18:42:48 +0000264bool Symbol::includeInDynsym() const {
265 if (Visibility != STV_DEFAULT && Visibility != STV_PROTECTED)
Rafael Espindolaae605c12016-04-21 20:35:25 +0000266 return false;
George Rimard3566302016-06-20 11:55:12 +0000267 return (ExportDynamic && VersionId != VER_NDX_LOCAL) || body()->isShared() ||
Peter Collingbourne4f952702016-05-01 04:55:03 +0000268 (body()->isUndefined() && Config->Shared);
Rafael Espindolaae605c12016-04-21 20:35:25 +0000269}
Rui Ueyama69c778c2016-07-17 17:50:09 +0000270
271// Print out a log message for --trace-symbol.
272void elf::printTraceSymbol(Symbol *Sym) {
273 SymbolBody *B = Sym->body();
274 outs() << getFilename(B->File);
275
276 if (B->isUndefined())
277 outs() << ": reference to ";
278 else if (B->isCommon())
279 outs() << ": common definition of ";
280 else
281 outs() << ": definition of ";
282 outs() << B->getName() << "\n";
283}
284
George Rimar1a33c0f2016-11-10 09:05:20 +0000285StringRef elf::getSymbolName(StringRef SymTab, SymbolBody &Body) {
286 if (Body.isLocal() && Body.getNameOffset())
287 return SymTab.data() + Body.getNameOffset();
288 if (!Body.isLocal())
289 return Body.getName();
290 return "";
291}
292
Peter Smithfb05cd92016-07-08 16:10:27 +0000293template bool SymbolBody::hasThunk<ELF32LE>() const;
294template bool SymbolBody::hasThunk<ELF32BE>() const;
295template bool SymbolBody::hasThunk<ELF64LE>() const;
296template bool SymbolBody::hasThunk<ELF64BE>() const;
Rafael Espindolaae605c12016-04-21 20:35:25 +0000297
Rafael Espindola87d9f102016-03-11 12:19:05 +0000298template uint32_t SymbolBody::template getVA<ELF32LE>(uint32_t) const;
299template uint32_t SymbolBody::template getVA<ELF32BE>(uint32_t) const;
300template uint64_t SymbolBody::template getVA<ELF64LE>(uint64_t) const;
301template uint64_t SymbolBody::template getVA<ELF64BE>(uint64_t) const;
Rui Ueyamab5a69702016-02-01 21:00:35 +0000302
303template uint32_t SymbolBody::template getGotVA<ELF32LE>() const;
304template uint32_t SymbolBody::template getGotVA<ELF32BE>() const;
305template uint64_t SymbolBody::template getGotVA<ELF64LE>() const;
306template uint64_t SymbolBody::template getGotVA<ELF64BE>() const;
307
Rafael Espindola74031ba2016-04-07 15:20:56 +0000308template uint32_t SymbolBody::template getGotOffset<ELF32LE>() const;
309template uint32_t SymbolBody::template getGotOffset<ELF32BE>() const;
310template uint64_t SymbolBody::template getGotOffset<ELF64LE>() const;
311template uint64_t SymbolBody::template getGotOffset<ELF64BE>() const;
312
Rui Ueyamab5a69702016-02-01 21:00:35 +0000313template uint32_t SymbolBody::template getGotPltVA<ELF32LE>() const;
314template uint32_t SymbolBody::template getGotPltVA<ELF32BE>() const;
315template uint64_t SymbolBody::template getGotPltVA<ELF64LE>() const;
316template uint64_t SymbolBody::template getGotPltVA<ELF64BE>() const;
317
Peter Smithfb05cd92016-07-08 16:10:27 +0000318template uint32_t SymbolBody::template getThunkVA<ELF32LE>() const;
319template uint32_t SymbolBody::template getThunkVA<ELF32BE>() const;
320template uint64_t SymbolBody::template getThunkVA<ELF64LE>() const;
321template uint64_t SymbolBody::template getThunkVA<ELF64BE>() const;
322
Rafael Espindola74031ba2016-04-07 15:20:56 +0000323template uint32_t SymbolBody::template getGotPltOffset<ELF32LE>() const;
324template uint32_t SymbolBody::template getGotPltOffset<ELF32BE>() const;
325template uint64_t SymbolBody::template getGotPltOffset<ELF64LE>() const;
326template uint64_t SymbolBody::template getGotPltOffset<ELF64BE>() const;
327
Rui Ueyamab5a69702016-02-01 21:00:35 +0000328template uint32_t SymbolBody::template getPltVA<ELF32LE>() const;
329template uint32_t SymbolBody::template getPltVA<ELF32BE>() const;
330template uint64_t SymbolBody::template getPltVA<ELF64LE>() const;
331template uint64_t SymbolBody::template getPltVA<ELF64BE>() const;
332
Rui Ueyama512c61d2016-02-03 00:12:24 +0000333template uint32_t SymbolBody::template getSize<ELF32LE>() const;
334template uint32_t SymbolBody::template getSize<ELF32BE>() const;
335template uint64_t SymbolBody::template getSize<ELF64LE>() const;
336template uint64_t SymbolBody::template getSize<ELF64BE>() const;
337
Simon Atanasyanf967f092016-09-29 12:58:36 +0000338template class elf::DefinedRegular<ELF32LE>;
339template class elf::DefinedRegular<ELF32BE>;
340template class elf::DefinedRegular<ELF64LE>;
341template class elf::DefinedRegular<ELF64BE>;
342
Rafael Espindolae0df00b2016-02-28 00:25:54 +0000343template class elf::DefinedSynthetic<ELF32LE>;
344template class elf::DefinedSynthetic<ELF32BE>;
345template class elf::DefinedSynthetic<ELF64LE>;
346template class elf::DefinedSynthetic<ELF64BE>;