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