Michael J. Spencer | 84487f1 | 2015-07-24 21:03:07 +0000 | [diff] [blame] | 1 | //===- SymbolTable.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 | //===----------------------------------------------------------------------===// |
Rui Ueyama | 34f2924 | 2015-10-13 19:51:57 +0000 | [diff] [blame] | 9 | // |
| 10 | // Symbol table is a bag of all known symbols. We put all symbols of |
| 11 | // all input files to the symbol table. The symbol Table is basically |
| 12 | // a hash table with the logic to resolve symbol name conflicts using |
| 13 | // the symbol types. |
| 14 | // |
| 15 | //===----------------------------------------------------------------------===// |
Michael J. Spencer | 84487f1 | 2015-07-24 21:03:07 +0000 | [diff] [blame] | 16 | |
| 17 | #include "SymbolTable.h" |
Rafael Espindola | 4340aad | 2015-09-11 22:42:45 +0000 | [diff] [blame] | 18 | #include "Config.h" |
Rafael Espindola | 192e1fa | 2015-08-06 15:08:23 +0000 | [diff] [blame] | 19 | #include "Error.h" |
Michael J. Spencer | 84487f1 | 2015-07-24 21:03:07 +0000 | [diff] [blame] | 20 | #include "Symbols.h" |
| 21 | |
| 22 | using namespace llvm; |
Rafael Espindola | daa92a6 | 2015-08-31 01:16:19 +0000 | [diff] [blame] | 23 | using namespace llvm::object; |
Rafael Espindola | 01205f7 | 2015-09-22 18:19:46 +0000 | [diff] [blame] | 24 | using namespace llvm::ELF; |
Michael J. Spencer | 84487f1 | 2015-07-24 21:03:07 +0000 | [diff] [blame] | 25 | |
| 26 | using namespace lld; |
| 27 | using namespace lld::elf2; |
| 28 | |
Rui Ueyama | 3ce825e | 2015-10-09 21:07:25 +0000 | [diff] [blame] | 29 | template <class ELFT> SymbolTable<ELFT>::SymbolTable() {} |
Michael J. Spencer | 84487f1 | 2015-07-24 21:03:07 +0000 | [diff] [blame] | 30 | |
Rui Ueyama | 3ce825e | 2015-10-09 21:07:25 +0000 | [diff] [blame] | 31 | template <class ELFT> |
Rui Ueyama | 25b44c9 | 2015-12-16 23:31:22 +0000 | [diff] [blame] | 32 | static void checkCompatibility(InputFile *FileP) { |
| 33 | auto *F = dyn_cast<ELFFileBase<ELFT>>(FileP); |
| 34 | if (!F) |
| 35 | return; |
| 36 | if (F->getELFKind() == Config->EKind && F->getEMachine() == Config->EMachine) |
| 37 | return; |
| 38 | StringRef A = F->getName(); |
| 39 | StringRef B = Config->Emulation; |
| 40 | if (B.empty()) |
| 41 | B = Config->FirstElf->getName(); |
| 42 | error(A + " is incompatible with " + B); |
| 43 | } |
| 44 | |
| 45 | template <class ELFT> |
Rui Ueyama | 3ce825e | 2015-10-09 21:07:25 +0000 | [diff] [blame] | 46 | void SymbolTable<ELFT>::addFile(std::unique_ptr<InputFile> File) { |
Rafael Espindola | 21f7bd4 | 2015-12-23 14:35:51 +0000 | [diff] [blame] | 47 | InputFile *FileP = File.get(); |
Rui Ueyama | 25b44c9 | 2015-12-16 23:31:22 +0000 | [diff] [blame] | 48 | checkCompatibility<ELFT>(FileP); |
Rafael Espindola | 525914d | 2015-10-11 03:36:49 +0000 | [diff] [blame] | 49 | |
Rui Ueyama | 8957574 | 2015-12-16 22:59:13 +0000 | [diff] [blame] | 50 | // .a file |
| 51 | if (auto *F = dyn_cast<ArchiveFile>(FileP)) { |
Rafael Espindola | 21f7bd4 | 2015-12-23 14:35:51 +0000 | [diff] [blame] | 52 | ArchiveFiles.emplace_back(cast<ArchiveFile>(File.release())); |
Rui Ueyama | 8957574 | 2015-12-16 22:59:13 +0000 | [diff] [blame] | 53 | F->parse(); |
| 54 | for (Lazy &Sym : F->getLazySymbols()) |
Michael J. Spencer | 1b348a6 | 2015-09-04 22:28:10 +0000 | [diff] [blame] | 55 | addLazy(&Sym); |
| 56 | return; |
| 57 | } |
Rui Ueyama | 3d45179 | 2015-10-12 18:03:21 +0000 | [diff] [blame] | 58 | |
Rui Ueyama | 8957574 | 2015-12-16 22:59:13 +0000 | [diff] [blame] | 59 | // .so file |
| 60 | if (auto *F = dyn_cast<SharedFile<ELFT>>(FileP)) { |
| 61 | // DSOs are uniquified not by filename but by soname. |
| 62 | F->parseSoName(); |
Rafael Espindola | 21f7bd4 | 2015-12-23 14:35:51 +0000 | [diff] [blame] | 63 | if (!IncludedSoNames.insert(F->getSoName()).second) |
Rafael Espindola | 6a3b5de | 2015-10-01 19:52:48 +0000 | [diff] [blame] | 64 | return; |
Rui Ueyama | 8957574 | 2015-12-16 22:59:13 +0000 | [diff] [blame] | 65 | |
Rafael Espindola | 21f7bd4 | 2015-12-23 14:35:51 +0000 | [diff] [blame] | 66 | SharedFiles.emplace_back(cast<SharedFile<ELFT>>(File.release())); |
Rui Ueyama | 8957574 | 2015-12-16 22:59:13 +0000 | [diff] [blame] | 67 | F->parse(); |
| 68 | for (SharedSymbol<ELFT> &B : F->getSharedSymbols()) |
| 69 | resolve(&B); |
| 70 | return; |
Rafael Espindola | 6a3b5de | 2015-10-01 19:52:48 +0000 | [diff] [blame] | 71 | } |
Rui Ueyama | 8957574 | 2015-12-16 22:59:13 +0000 | [diff] [blame] | 72 | |
| 73 | // .o file |
| 74 | auto *F = cast<ObjectFile<ELFT>>(FileP); |
Rafael Espindola | 21f7bd4 | 2015-12-23 14:35:51 +0000 | [diff] [blame] | 75 | ObjectFiles.emplace_back(cast<ObjectFile<ELFT>>(File.release())); |
Rui Ueyama | 8957574 | 2015-12-16 22:59:13 +0000 | [diff] [blame] | 76 | F->parse(Comdats); |
| 77 | for (SymbolBody *B : F->getSymbols()) |
| 78 | resolve(B); |
Michael J. Spencer | 84487f1 | 2015-07-24 21:03:07 +0000 | [diff] [blame] | 79 | } |
| 80 | |
Rui Ueyama | 01a65b1 | 2015-12-24 10:37:32 +0000 | [diff] [blame^] | 81 | // Add an undefined symbol. |
Rui Ueyama | ff77768 | 2015-10-09 21:12:40 +0000 | [diff] [blame] | 82 | template <class ELFT> |
| 83 | SymbolBody *SymbolTable<ELFT>::addUndefined(StringRef Name) { |
Rafael Espindola | 5d7593b | 2015-12-22 23:00:50 +0000 | [diff] [blame] | 84 | auto *Sym = new (Alloc) Undefined(Name, false, STV_DEFAULT, false); |
Rui Ueyama | ff77768 | 2015-10-09 21:12:40 +0000 | [diff] [blame] | 85 | resolve(Sym); |
| 86 | return Sym; |
Rafael Espindola | 1d6063e | 2015-09-22 21:24:52 +0000 | [diff] [blame] | 87 | } |
| 88 | |
Rui Ueyama | 01a65b1 | 2015-12-24 10:37:32 +0000 | [diff] [blame^] | 89 | // Add an undefined symbol. Unlike addUndefined, that symbol |
| 90 | // doesn't have to be resolved, thus "opt" (optional). |
Rui Ueyama | ff77768 | 2015-10-09 21:12:40 +0000 | [diff] [blame] | 91 | template <class ELFT> |
| 92 | SymbolBody *SymbolTable<ELFT>::addUndefinedOpt(StringRef Name) { |
Rafael Espindola | 5d7593b | 2015-12-22 23:00:50 +0000 | [diff] [blame] | 93 | auto *Sym = new (Alloc) Undefined(Name, false, STV_HIDDEN, true); |
Rui Ueyama | ff77768 | 2015-10-09 21:12:40 +0000 | [diff] [blame] | 94 | resolve(Sym); |
| 95 | return Sym; |
Denis Protivensky | 22220d5 | 2015-10-05 09:43:57 +0000 | [diff] [blame] | 96 | } |
| 97 | |
Rafael Espindola | 0e604f9 | 2015-09-25 18:56:53 +0000 | [diff] [blame] | 98 | template <class ELFT> |
Rui Ueyama | dd7d998 | 2015-12-16 22:31:14 +0000 | [diff] [blame] | 99 | void SymbolTable<ELFT>::addAbsolute(StringRef Name, |
| 100 | typename ELFFile<ELFT>::Elf_Sym &ESym) { |
Igor Kudrin | 15cd9ff | 2015-11-06 07:43:03 +0000 | [diff] [blame] | 101 | resolve(new (Alloc) DefinedAbsolute<ELFT>(Name, ESym)); |
| 102 | } |
| 103 | |
| 104 | template <class ELFT> |
Rui Ueyama | dd7d998 | 2015-12-16 22:31:14 +0000 | [diff] [blame] | 105 | void SymbolTable<ELFT>::addSynthetic(StringRef Name, |
| 106 | OutputSectionBase<ELFT> &Section, |
| 107 | typename ELFFile<ELFT>::uintX_t Value) { |
Rafael Espindola | 4d4b06a | 2015-12-24 00:47:42 +0000 | [diff] [blame] | 108 | auto *Sym = new (Alloc) DefinedSynthetic<ELFT>(Name, Value, Section); |
Rui Ueyama | 3ce825e | 2015-10-09 21:07:25 +0000 | [diff] [blame] | 109 | resolve(Sym); |
Rafael Espindola | 0e604f9 | 2015-09-25 18:56:53 +0000 | [diff] [blame] | 110 | } |
| 111 | |
Simon Atanasyan | 09dae7c | 2015-12-16 14:45:09 +0000 | [diff] [blame] | 112 | template <class ELFT> |
Rui Ueyama | dd7d998 | 2015-12-16 22:31:14 +0000 | [diff] [blame] | 113 | SymbolBody *SymbolTable<ELFT>::addIgnored(StringRef Name) { |
Rui Ueyama | a71f3a7 | 2015-12-16 22:36:10 +0000 | [diff] [blame] | 114 | auto *Sym = new (Alloc) |
Rafael Espindola | 5d41326 | 2015-10-01 21:22:26 +0000 | [diff] [blame] | 115 | DefinedAbsolute<ELFT>(Name, DefinedAbsolute<ELFT>::IgnoreUndef); |
Rui Ueyama | 3ce825e | 2015-10-09 21:07:25 +0000 | [diff] [blame] | 116 | resolve(Sym); |
Simon Atanasyan | 09dae7c | 2015-12-16 14:45:09 +0000 | [diff] [blame] | 117 | return Sym; |
Rafael Espindola | 5d41326 | 2015-10-01 21:22:26 +0000 | [diff] [blame] | 118 | } |
| 119 | |
Rui Ueyama | d9189ce | 2015-10-15 17:11:03 +0000 | [diff] [blame] | 120 | template <class ELFT> bool SymbolTable<ELFT>::isUndefined(StringRef Name) { |
| 121 | if (SymbolBody *Sym = find(Name)) |
| 122 | return Sym->isUndefined(); |
| 123 | return false; |
| 124 | } |
| 125 | |
Rui Ueyama | 533336a | 2015-12-16 22:26:48 +0000 | [diff] [blame] | 126 | // Returns a file from which symbol B was created. |
| 127 | // If B does not belong to any file in ObjectFiles, returns a nullptr. |
Rafael Espindola | 1a49e58 | 2015-09-23 14:10:24 +0000 | [diff] [blame] | 128 | template <class ELFT> |
Rafael Espindola | 8a9f90e | 2015-12-21 19:09:19 +0000 | [diff] [blame] | 129 | ELFFileBase<ELFT> * |
| 130 | elf2::findFile(ArrayRef<std::unique_ptr<ObjectFile<ELFT>>> ObjectFiles, |
| 131 | const SymbolBody *B) { |
Rui Ueyama | 533336a | 2015-12-16 22:26:48 +0000 | [diff] [blame] | 132 | for (const std::unique_ptr<ObjectFile<ELFT>> &F : ObjectFiles) { |
Rafael Espindola | 5d7593b | 2015-12-22 23:00:50 +0000 | [diff] [blame] | 133 | ArrayRef<SymbolBody *> Syms = F->getSymbols(); |
| 134 | if (std::find(Syms.begin(), Syms.end(), B) != Syms.end()) |
Rui Ueyama | 533336a | 2015-12-16 22:26:48 +0000 | [diff] [blame] | 135 | return F.get(); |
Rafael Espindola | 1a49e58 | 2015-09-23 14:10:24 +0000 | [diff] [blame] | 136 | } |
Rui Ueyama | 533336a | 2015-12-16 22:26:48 +0000 | [diff] [blame] | 137 | return nullptr; |
| 138 | } |
| 139 | |
| 140 | template <class ELFT> |
| 141 | std::string SymbolTable<ELFT>::conflictMsg(SymbolBody *Old, SymbolBody *New) { |
Rafael Espindola | 8a9f90e | 2015-12-21 19:09:19 +0000 | [diff] [blame] | 142 | ELFFileBase<ELFT> *OldFile = findFile<ELFT>(ObjectFiles, Old); |
| 143 | ELFFileBase<ELFT> *NewFile = findFile<ELFT>(ObjectFiles, New); |
Rafael Espindola | 1a49e58 | 2015-09-23 14:10:24 +0000 | [diff] [blame] | 144 | |
Rui Ueyama | f090401 | 2015-12-16 22:26:45 +0000 | [diff] [blame] | 145 | StringRef Sym = Old->getName(); |
| 146 | StringRef F1 = OldFile ? OldFile->getName() : "(internal)"; |
| 147 | StringRef F2 = NewFile ? NewFile->getName() : "(internal)"; |
| 148 | return (Sym + " in " + F1 + " and " + F2).str(); |
Rafael Espindola | 1a49e58 | 2015-09-23 14:10:24 +0000 | [diff] [blame] | 149 | } |
| 150 | |
Michael J. Spencer | 84487f1 | 2015-07-24 21:03:07 +0000 | [diff] [blame] | 151 | // This function resolves conflicts if there's an existing symbol with |
| 152 | // the same name. Decisions are made based on symbol type. |
Rui Ueyama | 3ce825e | 2015-10-09 21:07:25 +0000 | [diff] [blame] | 153 | template <class ELFT> void SymbolTable<ELFT>::resolve(SymbolBody *New) { |
Michael J. Spencer | 1b348a6 | 2015-09-04 22:28:10 +0000 | [diff] [blame] | 154 | Symbol *Sym = insert(New); |
| 155 | if (Sym->Body == New) |
| 156 | return; |
| 157 | |
| 158 | SymbolBody *Existing = Sym->Body; |
| 159 | |
| 160 | if (Lazy *L = dyn_cast<Lazy>(Existing)) { |
Rafael Espindola | 5d7593b | 2015-12-22 23:00:50 +0000 | [diff] [blame] | 161 | if (auto *Undef = dyn_cast<Undefined>(New)) { |
Rui Ueyama | c5b9512 | 2015-12-16 23:23:14 +0000 | [diff] [blame] | 162 | addMemberFile(Undef, L); |
Michael J. Spencer | 1b348a6 | 2015-09-04 22:28:10 +0000 | [diff] [blame] | 163 | return; |
| 164 | } |
Rui Ueyama | c5b9512 | 2015-12-16 23:23:14 +0000 | [diff] [blame] | 165 | // Found a definition for something also in an archive. |
| 166 | // Ignore the archive definition. |
Michael J. Spencer | 1b348a6 | 2015-09-04 22:28:10 +0000 | [diff] [blame] | 167 | Sym->Body = New; |
| 168 | return; |
| 169 | } |
| 170 | |
Rui Ueyama | 62d0e32 | 2015-12-17 00:04:18 +0000 | [diff] [blame] | 171 | if (New->isTls() != Existing->isTls()) |
Rui Ueyama | f090401 | 2015-12-16 22:26:45 +0000 | [diff] [blame] | 172 | error("TLS attribute mismatch for symbol: " + conflictMsg(Existing, New)); |
Igor Kudrin | 65bddea | 2015-10-09 09:58:39 +0000 | [diff] [blame] | 173 | |
Michael J. Spencer | 1b348a6 | 2015-09-04 22:28:10 +0000 | [diff] [blame] | 174 | // compare() returns -1, 0, or 1 if the lhs symbol is less preferable, |
| 175 | // equivalent (conflicting), or more preferable, respectively. |
| 176 | int comp = Existing->compare<ELFT>(New); |
Rui Ueyama | f090401 | 2015-12-16 22:26:45 +0000 | [diff] [blame] | 177 | if (comp == 0) { |
| 178 | std::string S = "duplicate symbol: " + conflictMsg(Existing, New); |
| 179 | if (!Config->AllowMultipleDefinition) |
| 180 | error(S); |
| 181 | warning(S); |
| 182 | return; |
| 183 | } |
Michael J. Spencer | 1b348a6 | 2015-09-04 22:28:10 +0000 | [diff] [blame] | 184 | if (comp < 0) |
| 185 | Sym->Body = New; |
Michael J. Spencer | 1b348a6 | 2015-09-04 22:28:10 +0000 | [diff] [blame] | 186 | } |
| 187 | |
Rui Ueyama | 3ce825e | 2015-10-09 21:07:25 +0000 | [diff] [blame] | 188 | template <class ELFT> Symbol *SymbolTable<ELFT>::insert(SymbolBody *New) { |
Michael J. Spencer | 84487f1 | 2015-07-24 21:03:07 +0000 | [diff] [blame] | 189 | // Find an existing Symbol or create and insert a new one. |
| 190 | StringRef Name = New->getName(); |
| 191 | Symbol *&Sym = Symtab[Name]; |
Rui Ueyama | 38dcc9e | 2015-12-16 23:25:31 +0000 | [diff] [blame] | 192 | if (!Sym) |
Rui Ueyama | 3554f59 | 2015-12-17 00:01:25 +0000 | [diff] [blame] | 193 | Sym = new (Alloc) Symbol{New}; |
Michael J. Spencer | 84487f1 | 2015-07-24 21:03:07 +0000 | [diff] [blame] | 194 | New->setBackref(Sym); |
Michael J. Spencer | 1b348a6 | 2015-09-04 22:28:10 +0000 | [diff] [blame] | 195 | return Sym; |
| 196 | } |
Michael J. Spencer | 84487f1 | 2015-07-24 21:03:07 +0000 | [diff] [blame] | 197 | |
Rui Ueyama | f8432d9 | 2015-10-13 16:34:14 +0000 | [diff] [blame] | 198 | template <class ELFT> SymbolBody *SymbolTable<ELFT>::find(StringRef Name) { |
| 199 | auto It = Symtab.find(Name); |
| 200 | if (It == Symtab.end()) |
| 201 | return nullptr; |
| 202 | return It->second->Body; |
| 203 | } |
| 204 | |
Rui Ueyama | c5b9512 | 2015-12-16 23:23:14 +0000 | [diff] [blame] | 205 | template <class ELFT> void SymbolTable<ELFT>::addLazy(Lazy *L) { |
| 206 | Symbol *Sym = insert(L); |
| 207 | if (Sym->Body == L) |
Michael J. Spencer | 1b348a6 | 2015-09-04 22:28:10 +0000 | [diff] [blame] | 208 | return; |
Rafael Espindola | 5d7593b | 2015-12-22 23:00:50 +0000 | [diff] [blame] | 209 | if (auto *Undef = dyn_cast<Undefined>(Sym->Body)) { |
Rui Ueyama | c5b9512 | 2015-12-16 23:23:14 +0000 | [diff] [blame] | 210 | Sym->Body = L; |
| 211 | addMemberFile(Undef, L); |
Rafael Espindola | 8614c56 | 2015-10-06 14:33:58 +0000 | [diff] [blame] | 212 | } |
Michael J. Spencer | 1b348a6 | 2015-09-04 22:28:10 +0000 | [diff] [blame] | 213 | } |
| 214 | |
Rui Ueyama | 3d45179 | 2015-10-12 18:03:21 +0000 | [diff] [blame] | 215 | template <class ELFT> |
Rafael Espindola | 5d7593b | 2015-12-22 23:00:50 +0000 | [diff] [blame] | 216 | void SymbolTable<ELFT>::addMemberFile(Undefined *Undef, Lazy *L) { |
Rui Ueyama | c5b9512 | 2015-12-16 23:23:14 +0000 | [diff] [blame] | 217 | // Weak undefined symbols should not fetch members from archives. |
| 218 | // If we were to keep old symbol we would not know that an archive member was |
| 219 | // available if a strong undefined symbol shows up afterwards in the link. |
| 220 | // If a strong undefined symbol never shows up, this lazy symbol will |
| 221 | // get to the end of the link and must be treated as the weak undefined one. |
| 222 | // We set UsedInRegularObj in a similar way to what is done with shared |
| 223 | // symbols and mark it as weak to reduce how many special cases are needed. |
| 224 | if (Undef->isWeak()) { |
| 225 | L->setUsedInRegularObj(); |
| 226 | L->setWeak(); |
| 227 | return; |
| 228 | } |
| 229 | |
| 230 | // Fetch a member file that has the definition for L. |
Michael J. Spencer | 1b348a6 | 2015-09-04 22:28:10 +0000 | [diff] [blame] | 231 | // getMember returns nullptr if the member was already read from the library. |
Rui Ueyama | c5b9512 | 2015-12-16 23:23:14 +0000 | [diff] [blame] | 232 | if (std::unique_ptr<InputFile> File = L->getMember()) |
Rui Ueyama | 690db67 | 2015-10-14 22:32:10 +0000 | [diff] [blame] | 233 | addFile(std::move(File)); |
Michael J. Spencer | 84487f1 | 2015-07-24 21:03:07 +0000 | [diff] [blame] | 234 | } |
Rafael Espindola | 0e604f9 | 2015-09-25 18:56:53 +0000 | [diff] [blame] | 235 | |
Rui Ueyama | 93bfee5 | 2015-10-13 18:10:33 +0000 | [diff] [blame] | 236 | // This function takes care of the case in which shared libraries depend on |
| 237 | // the user program (not the other way, which is usual). Shared libraries |
| 238 | // may have undefined symbols, expecting that the user program provides |
| 239 | // the definitions for them. An example is BSD's __progname symbol. |
| 240 | // We need to put such symbols to the main program's .dynsym so that |
| 241 | // shared libraries can find them. |
| 242 | // Except this, we ignore undefined symbols in DSOs. |
| 243 | template <class ELFT> void SymbolTable<ELFT>::scanShlibUndefined() { |
Rui Ueyama | f8432d9 | 2015-10-13 16:34:14 +0000 | [diff] [blame] | 244 | for (std::unique_ptr<SharedFile<ELFT>> &File : SharedFiles) |
| 245 | for (StringRef U : File->getUndefinedSymbols()) |
| 246 | if (SymbolBody *Sym = find(U)) |
| 247 | if (Sym->isDefined()) |
| 248 | Sym->setUsedInDynamicReloc(); |
| 249 | } |
| 250 | |
Rui Ueyama | 3ce825e | 2015-10-09 21:07:25 +0000 | [diff] [blame] | 251 | template class lld::elf2::SymbolTable<ELF32LE>; |
| 252 | template class lld::elf2::SymbolTable<ELF32BE>; |
| 253 | template class lld::elf2::SymbolTable<ELF64LE>; |
| 254 | template class lld::elf2::SymbolTable<ELF64BE>; |
Rafael Espindola | 8a9f90e | 2015-12-21 19:09:19 +0000 | [diff] [blame] | 255 | |
| 256 | template ELFFileBase<ELF32LE> * |
| 257 | lld::elf2::findFile(ArrayRef<std::unique_ptr<ObjectFile<ELF32LE>>>, |
| 258 | const SymbolBody *); |
| 259 | template ELFFileBase<ELF32BE> * |
| 260 | lld::elf2::findFile(ArrayRef<std::unique_ptr<ObjectFile<ELF32BE>>>, |
| 261 | const SymbolBody *); |
| 262 | template ELFFileBase<ELF64LE> * |
| 263 | lld::elf2::findFile(ArrayRef<std::unique_ptr<ObjectFile<ELF64LE>>>, |
| 264 | const SymbolBody *); |
| 265 | template ELFFileBase<ELF64BE> * |
| 266 | lld::elf2::findFile(ArrayRef<std::unique_ptr<ObjectFile<ELF64BE>>>, |
| 267 | const SymbolBody *); |