Michael J. Spencer | 84487f1 | 2015-07-24 21:03:07 | [diff] [blame] | 1 | //===- 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 Espindola | 49a2ca6 | 2015-08-06 15:33:19 | [diff] [blame] | 11 | #include "Error.h" |
Michael J. Spencer | cdae0a4 | 2015-07-28 22:58:25 | [diff] [blame] | 12 | #include "InputFiles.h" |
Rui Ueyama | b5a6970 | 2016-02-01 21:00:35 | [diff] [blame] | 13 | #include "InputSection.h" |
| 14 | #include "OutputSections.h" |
| 15 | #include "Target.h" |
Michael J. Spencer | 84487f1 | 2015-07-24 21:03:07 | [diff] [blame] | 16 | |
Michael J. Spencer | 1b348a6 | 2015-09-04 22:28:10 | [diff] [blame] | 17 | #include "llvm/ADT/STLExtras.h" |
Rui Ueyama | a4a628f | 2016-01-13 18:55:39 | [diff] [blame] | 18 | #include "llvm/Config/config.h" |
| 19 | |
| 20 | #ifdef HAVE_CXXABI_H |
| 21 | #include <cxxabi.h> |
| 22 | #endif |
Michael J. Spencer | 1b348a6 | 2015-09-04 22:28:10 | [diff] [blame] | 23 | |
| 24 | using namespace llvm; |
Michael J. Spencer | 84487f1 | 2015-07-24 21:03:07 | [diff] [blame] | 25 | using namespace llvm::object; |
Rafael Espindola | 78471f0 | 2015-09-01 23:12:52 | [diff] [blame] | 26 | using namespace llvm::ELF; |
Michael J. Spencer | 84487f1 | 2015-07-24 21:03:07 | [diff] [blame] | 27 | |
| 28 | using namespace lld; |
Rafael Espindola | e0df00b | 2016-02-28 00:25:54 | [diff] [blame] | 29 | using namespace lld::elf; |
Michael J. Spencer | 84487f1 | 2015-07-24 21:03:07 | [diff] [blame] | 30 | |
Rui Ueyama | b5a6970 | 2016-02-01 21:00:35 | [diff] [blame] | 31 | template <class ELFT> |
Rafael Espindola | 87d9f10 | 2016-03-11 12:19:05 | [diff] [blame^] | 32 | static typename ELFFile<ELFT>::uintX_t |
| 33 | getSymVA(const SymbolBody &Body, typename ELFFile<ELFT>::uintX_t &Addend) { |
| 34 | typedef typename ELFFile<ELFT>::Elf_Sym Elf_Sym; |
| 35 | typedef typename ELFFile<ELFT>::uintX_t uintX_t; |
| 36 | |
| 37 | switch (Body.kind()) { |
| 38 | case SymbolBody::DefinedSyntheticKind: { |
| 39 | auto &D = cast<DefinedSynthetic<ELFT>>(Body); |
| 40 | return D.Section.getVA() + D.Value; |
Rui Ueyama | b5a6970 | 2016-02-01 21:00:35 | [diff] [blame] | 41 | } |
Rafael Espindola | 87d9f10 | 2016-03-11 12:19:05 | [diff] [blame^] | 42 | case SymbolBody::DefinedRegularKind: { |
| 43 | auto &D = cast<DefinedRegular<ELFT>>(Body); |
| 44 | InputSectionBase<ELFT> *SC = D.Section; |
Rui Ueyama | b5a6970 | 2016-02-01 21:00:35 | [diff] [blame] | 45 | |
| 46 | // This is an absolute symbol. |
| 47 | if (!SC) |
Rafael Espindola | 87d9f10 | 2016-03-11 12:19:05 | [diff] [blame^] | 48 | return D.Sym.st_value; |
Rui Ueyama | 0b28952 | 2016-02-25 18:43:51 | [diff] [blame] | 49 | assert(SC->Live); |
Rui Ueyama | b5a6970 | 2016-02-01 21:00:35 | [diff] [blame] | 50 | |
Rafael Espindola | 87d9f10 | 2016-03-11 12:19:05 | [diff] [blame^] | 51 | if (D.Sym.getType() == STT_TLS) |
| 52 | return SC->OutSec->getVA() + SC->getOffset(D.Sym) - |
Rui Ueyama | b5a6970 | 2016-02-01 21:00:35 | [diff] [blame] | 53 | Out<ELFT>::TlsPhdr->p_vaddr; |
Rafael Espindola | 87d9f10 | 2016-03-11 12:19:05 | [diff] [blame^] | 54 | return SC->OutSec->getVA() + SC->getOffset(D.Sym); |
Rui Ueyama | b5a6970 | 2016-02-01 21:00:35 | [diff] [blame] | 55 | } |
Rafael Espindola | 87d9f10 | 2016-03-11 12:19:05 | [diff] [blame^] | 56 | case SymbolBody::DefinedCommonKind: |
| 57 | return Out<ELFT>::Bss->getVA() + cast<DefinedCommon>(Body).OffsetInBss; |
| 58 | case SymbolBody::SharedKind: { |
| 59 | auto &SS = cast<SharedSymbol<ELFT>>(Body); |
| 60 | if (!SS.NeedsCopyOrPltAddr) |
Rafael Espindola | a0a65f9 | 2016-02-09 15:11:01 | [diff] [blame] | 61 | return 0; |
Rafael Espindola | 87d9f10 | 2016-03-11 12:19:05 | [diff] [blame^] | 62 | if (SS.IsFunc) |
| 63 | return Body.getPltVA<ELFT>(); |
Rafael Espindola | a0a65f9 | 2016-02-09 15:11:01 | [diff] [blame] | 64 | else |
Rafael Espindola | 87d9f10 | 2016-03-11 12:19:05 | [diff] [blame^] | 65 | return Out<ELFT>::Bss->getVA() + SS.OffsetInBss; |
Rui Ueyama | b5a6970 | 2016-02-01 21:00:35 | [diff] [blame] | 66 | } |
Rafael Espindola | 87d9f10 | 2016-03-11 12:19:05 | [diff] [blame^] | 67 | case SymbolBody::UndefinedElfKind: |
| 68 | case SymbolBody::UndefinedKind: |
Rui Ueyama | b5a6970 | 2016-02-01 21:00:35 | [diff] [blame] | 69 | return 0; |
Rafael Espindola | 87d9f10 | 2016-03-11 12:19:05 | [diff] [blame^] | 70 | case SymbolBody::LazyKind: |
| 71 | assert(Body.isUsedInRegularObj() && "Lazy symbol reached writer"); |
Rui Ueyama | b5a6970 | 2016-02-01 21:00:35 | [diff] [blame] | 72 | return 0; |
Rafael Espindola | 87d9f10 | 2016-03-11 12:19:05 | [diff] [blame^] | 73 | case SymbolBody::DefinedBitcodeKind: |
Rafael Espindola | 9f77ef0 | 2016-02-12 20:54:57 | [diff] [blame] | 74 | llvm_unreachable("Should have been replaced"); |
Rafael Espindola | 87d9f10 | 2016-03-11 12:19:05 | [diff] [blame^] | 75 | case SymbolBody::DefinedLocalKind: { |
| 76 | auto &L = cast<LocalSymbol<ELFT>>(Body); |
| 77 | InputSectionBase<ELFT> *SC = L.Section; |
| 78 | |
| 79 | // According to the ELF spec reference to a local symbol from outside the |
| 80 | // group are not allowed. Unfortunately .eh_frame breaks that rule and must |
| 81 | // be treated specially. For now we just replace the symbol with 0. |
| 82 | if (SC == InputSection<ELFT>::Discarded || !SC->Live) |
| 83 | return 0; |
| 84 | |
| 85 | const Elf_Sym &Sym = L.Sym; |
| 86 | uintX_t Offset = Sym.st_value; |
| 87 | if (Sym.getType() == STT_TLS) |
| 88 | return (SC->OutSec->getVA() + SC->getOffset(Sym) + Addend) - |
| 89 | Out<ELFT>::TlsPhdr->p_vaddr; |
| 90 | if (Sym.getType() == STT_SECTION) { |
| 91 | Offset += Addend; |
| 92 | Addend = 0; |
| 93 | } |
| 94 | return SC->OutSec->getVA() + SC->getOffset(Offset); |
| 95 | } |
Rui Ueyama | b5a6970 | 2016-02-01 21:00:35 | [diff] [blame] | 96 | } |
| 97 | llvm_unreachable("Invalid symbol kind"); |
| 98 | } |
| 99 | |
| 100 | template <class ELFT> |
Rafael Espindola | 87d9f10 | 2016-03-11 12:19:05 | [diff] [blame^] | 101 | typename ELFFile<ELFT>::uintX_t |
| 102 | SymbolBody::getVA(typename ELFFile<ELFT>::uintX_t Addend) const { |
| 103 | return getSymVA<ELFT>(*this, Addend) + Addend; |
| 104 | } |
| 105 | |
| 106 | template <class ELFT> |
Rui Ueyama | b5a6970 | 2016-02-01 21:00:35 | [diff] [blame] | 107 | typename ELFFile<ELFT>::uintX_t SymbolBody::getGotVA() const { |
| 108 | return Out<ELFT>::Got->getVA() + |
| 109 | (Out<ELFT>::Got->getMipsLocalEntriesNum() + GotIndex) * |
| 110 | sizeof(typename ELFFile<ELFT>::uintX_t); |
| 111 | } |
| 112 | |
| 113 | template <class ELFT> |
| 114 | typename ELFFile<ELFT>::uintX_t SymbolBody::getGotPltVA() const { |
| 115 | return Out<ELFT>::GotPlt->getVA() + |
| 116 | GotPltIndex * sizeof(typename ELFFile<ELFT>::uintX_t); |
| 117 | } |
| 118 | |
| 119 | template <class ELFT> |
| 120 | typename ELFFile<ELFT>::uintX_t SymbolBody::getPltVA() const { |
| 121 | return Out<ELFT>::Plt->getVA() + Target->PltZeroSize + |
| 122 | PltIndex * Target->PltEntrySize; |
| 123 | } |
| 124 | |
Rui Ueyama | 512c61d | 2016-02-03 00:12:24 | [diff] [blame] | 125 | template <class ELFT> |
| 126 | typename ELFFile<ELFT>::uintX_t SymbolBody::getSize() const { |
| 127 | if (auto *B = dyn_cast<DefinedElf<ELFT>>(this)) |
| 128 | return B->Sym.st_size; |
| 129 | return 0; |
| 130 | } |
| 131 | |
Rafael Espindola | 78471f0 | 2015-09-01 23:12:52 | [diff] [blame] | 132 | static uint8_t getMinVisibility(uint8_t VA, uint8_t VB) { |
| 133 | if (VA == STV_DEFAULT) |
| 134 | return VB; |
| 135 | if (VB == STV_DEFAULT) |
| 136 | return VA; |
| 137 | return std::min(VA, VB); |
| 138 | } |
| 139 | |
George Rimar | 3498c7f | 2016-03-10 18:49:24 | [diff] [blame] | 140 | static int compareCommons(DefinedCommon *A, DefinedCommon *B) { |
Rui Ueyama | 17d6983 | 2016-03-10 18:58:53 | [diff] [blame] | 141 | A->Alignment = B->Alignment = std::max(A->Alignment, B->Alignment); |
George Rimar | 3498c7f | 2016-03-10 18:49:24 | [diff] [blame] | 142 | if (A->Size < B->Size) |
| 143 | return -1; |
| 144 | return 1; |
| 145 | } |
| 146 | |
Michael J. Spencer | 84487f1 | 2015-07-24 21:03:07 | [diff] [blame] | 147 | // Returns 1, 0 or -1 if this symbol should take precedence |
| 148 | // over the Other, tie or lose, respectively. |
Rafael Espindola | daa92a6 | 2015-08-31 01:16:19 | [diff] [blame] | 149 | template <class ELFT> int SymbolBody::compare(SymbolBody *Other) { |
Michael J. Spencer | 1b348a6 | 2015-09-04 22:28:10 | [diff] [blame] | 150 | assert(!isLazy() && !Other->isLazy()); |
Rafael Espindola | 0bc0c02 | 2016-01-18 23:54:05 | [diff] [blame] | 151 | std::tuple<bool, bool, bool> L(isDefined(), !isShared(), !isWeak()); |
| 152 | std::tuple<bool, bool, bool> R(Other->isDefined(), !Other->isShared(), |
| 153 | !Other->isWeak()); |
Rui Ueyama | a7ccb29 | 2015-07-27 20:39:01 | [diff] [blame] | 154 | |
Rafael Espindola | 3a63f3f | 2015-08-28 20:19:34 | [diff] [blame] | 155 | // Normalize |
| 156 | if (L > R) |
Rafael Espindola | daa92a6 | 2015-08-31 01:16:19 | [diff] [blame] | 157 | return -Other->compare<ELFT>(this); |
Rui Ueyama | a7ccb29 | 2015-07-27 20:39:01 | [diff] [blame] | 158 | |
Rui Ueyama | 8f2c4da | 2015-10-21 18:13:47 | [diff] [blame] | 159 | Visibility = Other->Visibility = |
| 160 | getMinVisibility(Visibility, Other->Visibility); |
Rafael Espindola | 78471f0 | 2015-09-01 23:12:52 | [diff] [blame] | 161 | |
Rui Ueyama | 86696f3 | 2015-10-21 19:41:03 | [diff] [blame] | 162 | if (IsUsedInRegularObj || Other->IsUsedInRegularObj) |
| 163 | IsUsedInRegularObj = Other->IsUsedInRegularObj = true; |
Rafael Espindola | 18173d4 | 2015-09-08 15:50:05 | [diff] [blame] | 164 | |
George Rimar | 02ca179 | 2016-01-25 08:44:38 | [diff] [blame] | 165 | // We want to export all symbols that exist both in the executable |
| 166 | // and in DSOs, so that the symbols in the executable can interrupt |
| 167 | // symbols in the DSO at runtime. |
| 168 | if (isShared() != Other->isShared()) |
| 169 | if (isa<DefinedRegular<ELFT>>(isShared() ? Other : this)) |
Rafael Espindola | abebed9 | 2016-02-05 15:27:15 | [diff] [blame] | 170 | MustBeInDynSym = Other->MustBeInDynSym = true; |
George Rimar | 02ca179 | 2016-01-25 08:44:38 | [diff] [blame] | 171 | |
Rafael Espindola | 3a63f3f | 2015-08-28 20:19:34 | [diff] [blame] | 172 | if (L != R) |
| 173 | return -1; |
George Rimar | 3498c7f | 2016-03-10 18:49:24 | [diff] [blame] | 174 | if (!isDefined() || isShared() || isWeak()) |
Rafael Espindola | 8e5560d | 2015-09-23 14:23:59 | [diff] [blame] | 175 | return 1; |
George Rimar | 3498c7f | 2016-03-10 18:49:24 | [diff] [blame] | 176 | if (!isCommon() && !Other->isCommon()) |
| 177 | return 0; |
| 178 | if (isCommon() && Other->isCommon()) |
| 179 | return compareCommons(cast<DefinedCommon>(this), |
| 180 | cast<DefinedCommon>(Other)); |
| 181 | return isCommon() ? -1 : 1; |
Michael J. Spencer | 84487f1 | 2015-07-24 21:03:07 | [diff] [blame] | 182 | } |
Rafael Espindola | daa92a6 | 2015-08-31 01:16:19 | [diff] [blame] | 183 | |
Rafael Espindola | 4d4b06a | 2015-12-24 00:47:42 | [diff] [blame] | 184 | Defined::Defined(Kind K, StringRef Name, bool IsWeak, uint8_t Visibility, |
Davide Italiano | 255730c | 2016-03-04 01:55:28 | [diff] [blame] | 185 | uint8_t Type) |
| 186 | : SymbolBody(K, Name, IsWeak, Visibility, Type) {} |
Rafael Espindola | 4d4b06a | 2015-12-24 00:47:42 | [diff] [blame] | 187 | |
Rafael Espindola | 4f29c1a | 2016-03-07 17:14:36 | [diff] [blame] | 188 | DefinedBitcode::DefinedBitcode(StringRef Name, bool IsWeak, uint8_t Visibility) |
| 189 | : Defined(DefinedBitcodeKind, Name, IsWeak, Visibility, 0 /* Type */) {} |
Rafael Espindola | 9f77ef0 | 2016-02-12 20:54:57 | [diff] [blame] | 190 | |
| 191 | bool DefinedBitcode::classof(const SymbolBody *S) { |
| 192 | return S->kind() == DefinedBitcodeKind; |
| 193 | } |
| 194 | |
Rafael Espindola | 5d7593b | 2015-12-22 23:00:50 | [diff] [blame] | 195 | Undefined::Undefined(SymbolBody::Kind K, StringRef N, bool IsWeak, |
Davide Italiano | 255730c | 2016-03-04 01:55:28 | [diff] [blame] | 196 | uint8_t Visibility, uint8_t Type) |
| 197 | : SymbolBody(K, N, IsWeak, Visibility, Type), |
George Rimar | 5c36e59 | 2016-02-02 09:28:53 | [diff] [blame] | 198 | CanKeepUndefined(false) {} |
Rafael Espindola | 5d7593b | 2015-12-22 23:00:50 | [diff] [blame] | 199 | |
| 200 | Undefined::Undefined(StringRef N, bool IsWeak, uint8_t Visibility, |
| 201 | bool CanKeepUndefined) |
Davide Italiano | 255730c | 2016-03-04 01:55:28 | [diff] [blame] | 202 | : Undefined(SymbolBody::UndefinedKind, N, IsWeak, Visibility, 0 /* Type */) { |
Rafael Espindola | 5d7593b | 2015-12-22 23:00:50 | [diff] [blame] | 203 | this->CanKeepUndefined = CanKeepUndefined; |
| 204 | } |
| 205 | |
| 206 | template <typename ELFT> |
| 207 | UndefinedElf<ELFT>::UndefinedElf(StringRef N, const Elf_Sym &Sym) |
| 208 | : Undefined(SymbolBody::UndefinedElfKind, N, |
| 209 | Sym.getBinding() == llvm::ELF::STB_WEAK, Sym.getVisibility(), |
Davide Italiano | 255730c | 2016-03-04 01:55:28 | [diff] [blame] | 210 | Sym.getType()), |
Rafael Espindola | 5d7593b | 2015-12-22 23:00:50 | [diff] [blame] | 211 | Sym(Sym) {} |
| 212 | |
Rafael Espindola | 4d4b06a | 2015-12-24 00:47:42 | [diff] [blame] | 213 | template <typename ELFT> |
| 214 | DefinedSynthetic<ELFT>::DefinedSynthetic(StringRef N, uintX_t Value, |
George Rimar | aa4dc20 | 2016-03-01 16:23:13 | [diff] [blame] | 215 | OutputSectionBase<ELFT> &Section, |
| 216 | uint8_t Visibility) |
| 217 | : Defined(SymbolBody::DefinedSyntheticKind, N, false, Visibility, |
Davide Italiano | 255730c | 2016-03-04 01:55:28 | [diff] [blame] | 218 | 0 /* Type */), |
Rafael Espindola | 4d4b06a | 2015-12-24 00:47:42 | [diff] [blame] | 219 | Value(Value), Section(Section) {} |
| 220 | |
Rafael Espindola | 1119191 | 2015-12-24 16:23:37 | [diff] [blame] | 221 | DefinedCommon::DefinedCommon(StringRef N, uint64_t Size, uint64_t Alignment, |
| 222 | bool IsWeak, uint8_t Visibility) |
George Rimar | 5c36e59 | 2016-02-02 09:28:53 | [diff] [blame] | 223 | : Defined(SymbolBody::DefinedCommonKind, N, IsWeak, Visibility, |
Rui Ueyama | 17d6983 | 2016-03-10 18:58:53 | [diff] [blame] | 224 | 0 /* Type */), |
| 225 | Alignment(Alignment), Size(Size) {} |
Rafael Espindola | 1119191 | 2015-12-24 16:23:37 | [diff] [blame] | 226 | |
Michael J. Spencer | 1b348a6 | 2015-09-04 22:28:10 | [diff] [blame] | 227 | std::unique_ptr<InputFile> Lazy::getMember() { |
| 228 | MemoryBufferRef MBRef = File->getMember(&Sym); |
| 229 | |
| 230 | // getMember returns an empty buffer if the member was already |
| 231 | // read from the library. |
| 232 | if (MBRef.getBuffer().empty()) |
| 233 | return std::unique_ptr<InputFile>(nullptr); |
Rui Ueyama | 71c066d | 2016-02-02 08:22:41 | [diff] [blame] | 234 | return createObjectFile(MBRef, File->getName()); |
Michael J. Spencer | 1b348a6 | 2015-09-04 22:28:10 | [diff] [blame] | 235 | } |
| 236 | |
Rui Ueyama | a4a628f | 2016-01-13 18:55:39 | [diff] [blame] | 237 | // Returns the demangled C++ symbol name for Name. |
Rafael Espindola | e0df00b | 2016-02-28 00:25:54 | [diff] [blame] | 238 | std::string elf::demangle(StringRef Name) { |
Rui Ueyama | a4a628f | 2016-01-13 18:55:39 | [diff] [blame] | 239 | #if !defined(HAVE_CXXABI_H) |
| 240 | return Name; |
| 241 | #else |
| 242 | if (!Config->Demangle) |
| 243 | return Name; |
Rui Ueyama | 5fa978b | 2016-01-13 19:40:13 | [diff] [blame] | 244 | |
Rui Ueyama | df15451 | 2016-01-13 22:09:09 | [diff] [blame] | 245 | // __cxa_demangle can be used to demangle strings other than symbol |
| 246 | // names which do not necessarily start with "_Z". Name can be |
| 247 | // either a C or C++ symbol. Don't call __cxa_demangle if the name |
| 248 | // does not look like a C++ symbol name to avoid getting unexpected |
| 249 | // result for a C symbol that happens to match a mangled type name. |
Rui Ueyama | 5fa978b | 2016-01-13 19:40:13 | [diff] [blame] | 250 | if (!Name.startswith("_Z")) |
| 251 | return Name; |
| 252 | |
Rui Ueyama | a4a628f | 2016-01-13 18:55:39 | [diff] [blame] | 253 | char *Buf = |
| 254 | abi::__cxa_demangle(Name.str().c_str(), nullptr, nullptr, nullptr); |
| 255 | if (!Buf) |
| 256 | return Name; |
| 257 | std::string S(Buf); |
| 258 | free(Buf); |
| 259 | return S; |
| 260 | #endif |
| 261 | } |
| 262 | |
Rafael Espindola | 87d9f10 | 2016-03-11 12:19:05 | [diff] [blame^] | 263 | template uint32_t SymbolBody::template getVA<ELF32LE>(uint32_t) const; |
| 264 | template uint32_t SymbolBody::template getVA<ELF32BE>(uint32_t) const; |
| 265 | template uint64_t SymbolBody::template getVA<ELF64LE>(uint64_t) const; |
| 266 | template uint64_t SymbolBody::template getVA<ELF64BE>(uint64_t) const; |
Rui Ueyama | b5a6970 | 2016-02-01 21:00:35 | [diff] [blame] | 267 | |
| 268 | template uint32_t SymbolBody::template getGotVA<ELF32LE>() const; |
| 269 | template uint32_t SymbolBody::template getGotVA<ELF32BE>() const; |
| 270 | template uint64_t SymbolBody::template getGotVA<ELF64LE>() const; |
| 271 | template uint64_t SymbolBody::template getGotVA<ELF64BE>() const; |
| 272 | |
| 273 | template uint32_t SymbolBody::template getGotPltVA<ELF32LE>() const; |
| 274 | template uint32_t SymbolBody::template getGotPltVA<ELF32BE>() const; |
| 275 | template uint64_t SymbolBody::template getGotPltVA<ELF64LE>() const; |
| 276 | template uint64_t SymbolBody::template getGotPltVA<ELF64BE>() const; |
| 277 | |
| 278 | template uint32_t SymbolBody::template getPltVA<ELF32LE>() const; |
| 279 | template uint32_t SymbolBody::template getPltVA<ELF32BE>() const; |
| 280 | template uint64_t SymbolBody::template getPltVA<ELF64LE>() const; |
| 281 | template uint64_t SymbolBody::template getPltVA<ELF64BE>() const; |
| 282 | |
Rui Ueyama | 512c61d | 2016-02-03 00:12:24 | [diff] [blame] | 283 | template uint32_t SymbolBody::template getSize<ELF32LE>() const; |
| 284 | template uint32_t SymbolBody::template getSize<ELF32BE>() const; |
| 285 | template uint64_t SymbolBody::template getSize<ELF64LE>() const; |
| 286 | template uint64_t SymbolBody::template getSize<ELF64BE>() const; |
| 287 | |
Rafael Espindola | daa92a6 | 2015-08-31 01:16:19 | [diff] [blame] | 288 | template int SymbolBody::compare<ELF32LE>(SymbolBody *Other); |
| 289 | template int SymbolBody::compare<ELF32BE>(SymbolBody *Other); |
| 290 | template int SymbolBody::compare<ELF64LE>(SymbolBody *Other); |
| 291 | template int SymbolBody::compare<ELF64BE>(SymbolBody *Other); |
Rafael Espindola | 5d7593b | 2015-12-22 23:00:50 | [diff] [blame] | 292 | |
Rafael Espindola | e0df00b | 2016-02-28 00:25:54 | [diff] [blame] | 293 | template class elf::UndefinedElf<ELF32LE>; |
| 294 | template class elf::UndefinedElf<ELF32BE>; |
| 295 | template class elf::UndefinedElf<ELF64LE>; |
| 296 | template class elf::UndefinedElf<ELF64BE>; |
Rafael Espindola | 4d4b06a | 2015-12-24 00:47:42 | [diff] [blame] | 297 | |
Rafael Espindola | e0df00b | 2016-02-28 00:25:54 | [diff] [blame] | 298 | template class elf::DefinedSynthetic<ELF32LE>; |
| 299 | template class elf::DefinedSynthetic<ELF32BE>; |
| 300 | template class elf::DefinedSynthetic<ELF64LE>; |
| 301 | template class elf::DefinedSynthetic<ELF64BE>; |