1 //===- Symbols.h ------------------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file defines various types of Symbols.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLD_ELF_SYMBOLS_H
14 #define LLD_ELF_SYMBOLS_H
15 
16 #include "InputFiles.h"
17 #include "InputSection.h"
18 #include "lld/Common/LLVM.h"
19 #include "lld/Common/Strings.h"
20 #include "llvm/ADT/DenseMap.h"
21 #include "llvm/Object/Archive.h"
22 #include "llvm/Object/ELF.h"
23 
24 namespace lld {
25 // Returns a string representation for a symbol for diagnostics.
26 std::string toString(const elf::Symbol &);
27 std::string verboseToString(const elf::Symbol *b, uint64_t symOffset = 0);
28 
29 // There are two different ways to convert an Archive::Symbol to a string:
30 // One for Microsoft name mangling and one for Itanium name mangling.
31 // Call the functions toCOFFString and toELFString, not just toString.
32 std::string toELFString(const llvm::object::Archive::Symbol &);
33 
34 namespace elf {
35 class CommonSymbol;
36 class Defined;
37 class InputFile;
38 class LazyArchive;
39 class LazyObject;
40 class SharedSymbol;
41 class Symbol;
42 class Undefined;
43 
44 // This is a StringRef-like container that doesn't run strlen().
45 //
46 // ELF string tables contain a lot of null-terminated strings. Most of them
47 // are not necessary for the linker because they are names of local symbols,
48 // and the linker doesn't use local symbol names for name resolution. So, we
49 // use this class to represents strings read from string tables.
50 struct StringRefZ {
StringRefZStringRefZ51   StringRefZ(const char *s) : data(s), size(-1) {}
StringRefZStringRefZ52   StringRefZ(StringRef s) : data(s.data()), size(s.size()) {}
53 
54   const char *data;
55   const uint32_t size;
56 };
57 
58 // The base class for real symbol classes.
59 class Symbol {
60 public:
61   enum Kind {
62     PlaceholderKind,
63     DefinedKind,
64     CommonKind,
65     SharedKind,
66     UndefinedKind,
67     LazyArchiveKind,
68     LazyObjectKind,
69   };
70 
kind()71   Kind kind() const { return static_cast<Kind>(symbolKind); }
72 
73   // The file from which this symbol was created.
74   InputFile *file;
75 
76 protected:
77   const char *nameData;
78   mutable uint32_t nameSize;
79 
80 public:
81   uint32_t dynsymIndex = 0;
82   uint32_t gotIndex = -1;
83   uint32_t pltIndex = -1;
84 
85   uint32_t globalDynIndex = -1;
86 
87   // This field is a index to the symbol's version definition.
88   uint32_t verdefIndex = -1;
89 
90   // Version definition index.
91   uint16_t versionId;
92 
93   // Symbol binding. This is not overwritten by replace() to track
94   // changes during resolution. In particular:
95   //  - An undefined weak is still weak when it resolves to a shared library.
96   //  - An undefined weak will not fetch archive members, but we have to
97   //    remember it is weak.
98   uint8_t binding;
99 
100   // The following fields have the same meaning as the ELF symbol attributes.
101   uint8_t type;    // symbol type
102   uint8_t stOther; // st_other field value
103 
104   uint8_t symbolKind;
105 
106   // Symbol visibility. This is the computed minimum visibility of all
107   // observed non-DSO symbols.
108   uint8_t visibility : 2;
109 
110   // True if the symbol was used for linking and thus need to be added to the
111   // output file's symbol table. This is true for all symbols except for
112   // unreferenced DSO symbols, lazy (archive) symbols, and bitcode symbols that
113   // are unreferenced except by other bitcode objects.
114   uint8_t isUsedInRegularObj : 1;
115 
116   // Used by a Defined symbol with protected or default visibility, to record
117   // whether it is required to be exported into .dynsym. This is set when any of
118   // the following conditions hold:
119   //
120   // - If there is an interposable symbol from a DSO.
121   // - If -shared or --export-dynamic is specified, any symbol in an object
122   //   file/bitcode sets this property, unless suppressed by LTO
123   //   canBeOmittedFromSymbolTable().
124   uint8_t exportDynamic : 1;
125 
126   // True if the symbol is in the --dynamic-list file. A Defined symbol with
127   // protected or default visibility with this property is required to be
128   // exported into .dynsym.
129   uint8_t inDynamicList : 1;
130 
131   // False if LTO shouldn't inline whatever this symbol points to. If a symbol
132   // is overwritten after LTO, LTO shouldn't inline the symbol because it
133   // doesn't know the final contents of the symbol.
134   uint8_t canInline : 1;
135 
136   // Used by Undefined and SharedSymbol to track if there has been at least one
137   // undefined reference to the symbol. The binding may change to STB_WEAK if
138   // the first undefined reference from a non-shared object is weak.
139   uint8_t referenced : 1;
140 
141   // True if this symbol is specified by --trace-symbol option.
142   uint8_t traced : 1;
143 
144   inline void replace(const Symbol &newSym);
145 
146   bool includeInDynsym() const;
147   uint8_t computeBinding() const;
isWeak()148   bool isWeak() const { return binding == llvm::ELF::STB_WEAK; }
149 
isUndefined()150   bool isUndefined() const { return symbolKind == UndefinedKind; }
isCommon()151   bool isCommon() const { return symbolKind == CommonKind; }
isDefined()152   bool isDefined() const { return symbolKind == DefinedKind; }
isShared()153   bool isShared() const { return symbolKind == SharedKind; }
isPlaceholder()154   bool isPlaceholder() const { return symbolKind == PlaceholderKind; }
155 
isLocal()156   bool isLocal() const { return binding == llvm::ELF::STB_LOCAL; }
157 
isLazy()158   bool isLazy() const {
159     return symbolKind == LazyArchiveKind || symbolKind == LazyObjectKind;
160   }
161 
162   // True if this is an undefined weak symbol. This only works once
163   // all input files have been added.
isUndefWeak()164   bool isUndefWeak() const {
165     // See comment on lazy symbols for details.
166     return isWeak() && (isUndefined() || isLazy());
167   }
168 
getName()169   StringRef getName() const {
170     if (nameSize == (uint32_t)-1)
171       nameSize = strlen(nameData);
172     return {nameData, nameSize};
173   }
174 
setName(StringRef s)175   void setName(StringRef s) {
176     nameData = s.data();
177     nameSize = s.size();
178   }
179 
180   void parseSymbolVersion();
181 
isInGot()182   bool isInGot() const { return gotIndex != -1U; }
isInPlt()183   bool isInPlt() const { return pltIndex != -1U; }
184 
185   uint64_t getVA(int64_t addend = 0) const;
186 
187   uint64_t getGotOffset() const;
188   uint64_t getGotVA() const;
189   uint64_t getGotPltOffset() const;
190   uint64_t getGotPltVA() const;
191   uint64_t getPltVA() const;
192   uint64_t getSize() const;
193   OutputSection *getOutputSection() const;
194 
195   // The following two functions are used for symbol resolution.
196   //
197   // You are expected to call mergeProperties for all symbols in input
198   // files so that attributes that are attached to names rather than
199   // indivisual symbol (such as visibility) are merged together.
200   //
201   // Every time you read a new symbol from an input, you are supposed
202   // to call resolve() with the new symbol. That function replaces
203   // "this" object as a result of name resolution if the new symbol is
204   // more appropriate to be included in the output.
205   //
206   // For example, if "this" is an undefined symbol and a new symbol is
207   // a defined symbol, "this" is replaced with the new symbol.
208   void mergeProperties(const Symbol &other);
209   void resolve(const Symbol &other);
210 
211   // If this is a lazy symbol, fetch an input file and add the symbol
212   // in the file to the symbol table. Calling this function on
213   // non-lazy object causes a runtime error.
214   void fetch() const;
215 
216 private:
isExportDynamic(Kind k,uint8_t visibility)217   static bool isExportDynamic(Kind k, uint8_t visibility) {
218     if (k == SharedKind)
219       return visibility == llvm::ELF::STV_DEFAULT;
220     return config->shared || config->exportDynamic;
221   }
222 
223   void resolveUndefined(const Undefined &other);
224   void resolveCommon(const CommonSymbol &other);
225   void resolveDefined(const Defined &other);
226   template <class LazyT> void resolveLazy(const LazyT &other);
227   void resolveShared(const SharedSymbol &other);
228 
229   int compare(const Symbol *other) const;
230 
231   inline size_t getSymbolSize() const;
232 
233 protected:
Symbol(Kind k,InputFile * file,StringRefZ name,uint8_t binding,uint8_t stOther,uint8_t type)234   Symbol(Kind k, InputFile *file, StringRefZ name, uint8_t binding,
235          uint8_t stOther, uint8_t type)
236       : file(file), nameData(name.data), nameSize(name.size), binding(binding),
237         type(type), stOther(stOther), symbolKind(k), visibility(stOther & 3),
238         isUsedInRegularObj(!file || file->kind() == InputFile::ObjKind),
239         exportDynamic(isExportDynamic(k, visibility)), inDynamicList(false),
240         canInline(false), referenced(false), traced(false), needsPltAddr(false),
241         isInIplt(false), gotInIgot(false), isPreemptible(false),
242         used(!config->gcSections), usedByDynReloc(false),
243         isSectionStartSymbol(false), needsTocRestore(false),
244         scriptDefined(false) {}
245 
246 public:
247   // True the symbol should point to its PLT entry.
248   // For SharedSymbol only.
249   uint8_t needsPltAddr : 1;
250 
251   // True if this symbol is in the Iplt sub-section of the Plt and the Igot
252   // sub-section of the .got.plt or .got.
253   uint8_t isInIplt : 1;
254 
255   // True if this symbol needs a GOT entry and its GOT entry is actually in
256   // Igot. This will be true only for certain non-preemptible ifuncs.
257   uint8_t gotInIgot : 1;
258 
259   // True if this symbol is preemptible at load time.
260   uint8_t isPreemptible : 1;
261 
262   // True if an undefined or shared symbol is used from a live section.
263   //
264   // NOTE: In Writer.cpp the field is used to mark local defined symbols
265   // which are referenced by relocations when -r or --emit-relocs is given.
266   uint8_t used : 1;
267 
268   // True if a symbol is referenced by a dynamic relocation and therefore needs
269   // to be included in the dynamic symbol table.
270   unsigned usedByDynReloc : 1;
271 
272   // True if the linker should set the size of this symbol to be the size of the
273   // section it references. For compatibility reason this is only used when
274   // building for CHERI
275   unsigned isSectionStartSymbol : 1;
276 
277   // True if a call to this symbol needs to be followed by a restore of the
278   // PPC64 toc pointer.
279   uint8_t needsTocRestore : 1;
280 
281   // True if this symbol is defined by a linker script.
282   uint8_t scriptDefined : 1;
283 
284   // The partition whose dynamic symbol table contains this symbol's definition.
285   uint8_t partition = 1;
286 
isSection()287   bool isSection() const { return type == llvm::ELF::STT_SECTION; }
isTls()288   bool isTls() const { return type == llvm::ELF::STT_TLS; }
isFunc()289   bool isFunc() const { return type == llvm::ELF::STT_FUNC; }
isGnuIFunc()290   bool isGnuIFunc() const { return type == llvm::ELF::STT_GNU_IFUNC; }
isObject()291   bool isObject() const { return type == llvm::ELF::STT_OBJECT; }
isFile()292   bool isFile() const { return type == llvm::ELF::STT_FILE; }
293 };
294 
295 // Represents a symbol that is defined in the current output file.
296 class Defined : public Symbol {
297 public:
Defined(InputFile * file,StringRefZ name,uint8_t binding,uint8_t stOther,uint8_t type,uint64_t value,uint64_t size,SectionBase * section)298   Defined(InputFile *file, StringRefZ name, uint8_t binding, uint8_t stOther,
299           uint8_t type, uint64_t value, uint64_t size, SectionBase *section)
300       : Symbol(DefinedKind, file, name, binding, stOther, type), value(value),
301         size(size), section(section) {}
302 
classof(const Symbol * s)303   static bool classof(const Symbol *s) { return s->isDefined(); }
304 
305   uint64_t value;
306   uint64_t size;
307   SectionBase *section;
308 };
309 
310 // Represents a common symbol.
311 //
312 // On Unix, it is traditionally allowed to write variable definitions
313 // without initialization expressions (such as "int foo;") to header
314 // files. Such definition is called "tentative definition".
315 //
316 // Using tentative definition is usually considered a bad practice
317 // because you should write only declarations (such as "extern int
318 // foo;") to header files. Nevertheless, the linker and the compiler
319 // have to do something to support bad code by allowing duplicate
320 // definitions for this particular case.
321 //
322 // Common symbols represent variable definitions without initializations.
323 // The compiler creates common symbols when it sees variable definitions
324 // without initialization (you can suppress this behavior and let the
325 // compiler create a regular defined symbol by -fno-common).
326 //
327 // The linker allows common symbols to be replaced by regular defined
328 // symbols. If there are remaining common symbols after name resolution is
329 // complete, they are converted to regular defined symbols in a .bss
330 // section. (Therefore, the later passes don't see any CommonSymbols.)
331 class CommonSymbol : public Symbol {
332 public:
CommonSymbol(InputFile * file,StringRefZ name,uint8_t binding,uint8_t stOther,uint8_t type,uint64_t alignment,uint64_t size)333   CommonSymbol(InputFile *file, StringRefZ name, uint8_t binding,
334                uint8_t stOther, uint8_t type, uint64_t alignment, uint64_t size)
335       : Symbol(CommonKind, file, name, binding, stOther, type),
336         alignment(alignment), size(size) {}
337 
classof(const Symbol * s)338   static bool classof(const Symbol *s) { return s->isCommon(); }
339 
340   uint32_t alignment;
341   uint64_t size;
342 };
343 
344 class Undefined : public Symbol {
345 public:
346   Undefined(InputFile *file, StringRefZ name, uint8_t binding, uint8_t stOther,
347             uint8_t type, uint32_t discardedSecIdx = 0)
Symbol(UndefinedKind,file,name,binding,stOther,type)348       : Symbol(UndefinedKind, file, name, binding, stOther, type),
349         discardedSecIdx(discardedSecIdx) {}
350 
classof(const Symbol * s)351   static bool classof(const Symbol *s) { return s->kind() == UndefinedKind; }
352 
353   // The section index if in a discarded section, 0 otherwise.
354   uint32_t discardedSecIdx;
355 };
356 
357 class SharedSymbol : public Symbol {
358 public:
classof(const Symbol * s)359   static bool classof(const Symbol *s) { return s->kind() == SharedKind; }
360 
SharedSymbol(InputFile & file,StringRef name,uint8_t binding,uint8_t stOther,uint8_t type,uint64_t value,uint64_t size,uint32_t alignment,uint32_t verdefIndex)361   SharedSymbol(InputFile &file, StringRef name, uint8_t binding,
362                uint8_t stOther, uint8_t type, uint64_t value, uint64_t size,
363                uint32_t alignment, uint32_t verdefIndex)
364       : Symbol(SharedKind, &file, name, binding, stOther, type), value(value),
365         size(size), alignment(alignment) {
366     this->verdefIndex = verdefIndex;
367     // GNU ifunc is a mechanism to allow user-supplied functions to
368     // resolve PLT slot values at load-time. This is contrary to the
369     // regular symbol resolution scheme in which symbols are resolved just
370     // by name. Using this hook, you can program how symbols are solved
371     // for you program. For example, you can make "memcpy" to be resolved
372     // to a SSE-enabled version of memcpy only when a machine running the
373     // program supports the SSE instruction set.
374     //
375     // Naturally, such symbols should always be called through their PLT
376     // slots. What GNU ifunc symbols point to are resolver functions, and
377     // calling them directly doesn't make sense (unless you are writing a
378     // loader).
379     //
380     // For DSO symbols, we always call them through PLT slots anyway.
381     // So there's no difference between GNU ifunc and regular function
382     // symbols if they are in DSOs. So we can handle GNU_IFUNC as FUNC.
383     if (this->type == llvm::ELF::STT_GNU_IFUNC)
384       this->type = llvm::ELF::STT_FUNC;
385   }
386 
getFile()387   SharedFile &getFile() const { return *cast<SharedFile>(file); }
388 
389   uint64_t value; // st_value
390   uint64_t size;  // st_size
391   uint32_t alignment;
392 };
393 
394 // LazyArchive and LazyObject represent a symbols that is not yet in the link,
395 // but we know where to find it if needed. If the resolver finds both Undefined
396 // and Lazy for the same name, it will ask the Lazy to load a file.
397 //
398 // A special complication is the handling of weak undefined symbols. They should
399 // not load a file, but we have to remember we have seen both the weak undefined
400 // and the lazy. We represent that with a lazy symbol with a weak binding. This
401 // means that code looking for undefined symbols normally also has to take lazy
402 // symbols into consideration.
403 
404 // This class represents a symbol defined in an archive file. It is
405 // created from an archive file header, and it knows how to load an
406 // object file from an archive to replace itself with a defined
407 // symbol.
408 class LazyArchive : public Symbol {
409 public:
LazyArchive(InputFile & file,const llvm::object::Archive::Symbol s)410   LazyArchive(InputFile &file, const llvm::object::Archive::Symbol s)
411       : Symbol(LazyArchiveKind, &file, s.getName(), llvm::ELF::STB_GLOBAL,
412                llvm::ELF::STV_DEFAULT, llvm::ELF::STT_NOTYPE),
413         sym(s) {}
414 
classof(const Symbol * s)415   static bool classof(const Symbol *s) { return s->kind() == LazyArchiveKind; }
416 
417   MemoryBufferRef getMemberBuffer();
418 
419   const llvm::object::Archive::Symbol sym;
420 };
421 
422 // LazyObject symbols represents symbols in object files between
423 // --start-lib and --end-lib options.
424 class LazyObject : public Symbol {
425 public:
LazyObject(InputFile & file,StringRef name)426   LazyObject(InputFile &file, StringRef name)
427       : Symbol(LazyObjectKind, &file, name, llvm::ELF::STB_GLOBAL,
428                llvm::ELF::STV_DEFAULT, llvm::ELF::STT_NOTYPE) {}
429 
classof(const Symbol * s)430   static bool classof(const Symbol *s) { return s->kind() == LazyObjectKind; }
431 };
432 
433 // Some linker-generated symbols need to be created as
434 // Defined symbols.
435 struct ElfSym {
436   // __bss_start
437   static Defined *bss;
438 
439   // etext and _etext
440   static Defined *etext1;
441   static Defined *etext2;
442 
443   // edata and _edata
444   static Defined *edata1;
445   static Defined *edata2;
446 
447   // end and _end
448   static Defined *end1;
449   static Defined *end2;
450 
451   // The _GLOBAL_OFFSET_TABLE_ symbol is defined by target convention to
452   // be at some offset from the base of the .got section, usually 0 or
453   // the end of the .got.
454   static Defined *globalOffsetTable;
455 
456   // _gp, _gp_disp and __gnu_local_gp symbols. Only for MIPS.
457   static Defined *mipsGp;
458   static Defined *mipsGpDisp;
459   static Defined *mipsLocalGp;
460 
461   // The _CHERI_CAPABILITY_TABLE_ symbol points to the beginning of the
462   // .captable section
463   static Defined *cheriCapabilityTable;
464 
465   // __rel{,a}_iplt_{start,end} symbols.
466   static Defined *relaIpltStart;
467   static Defined *relaIpltEnd;
468 
469   // __global_pointer$ for RISC-V.
470   static Defined *riscvGlobalPointer;
471 
472   // _TLS_MODULE_BASE_ on targets that support TLSDESC.
473   static Defined *tlsModuleBase;
474 };
475 
476 // A buffer class that is large enough to hold any Symbol-derived
477 // object. We allocate memory using this class and instantiate a symbol
478 // using the placement new.
479 union SymbolUnion {
480   alignas(Defined) char a[sizeof(Defined)];
481   alignas(CommonSymbol) char b[sizeof(CommonSymbol)];
482   alignas(Undefined) char c[sizeof(Undefined)];
483   alignas(SharedSymbol) char d[sizeof(SharedSymbol)];
484   alignas(LazyArchive) char e[sizeof(LazyArchive)];
485   alignas(LazyObject) char f[sizeof(LazyObject)];
486 };
487 
488 // It is important to keep the size of SymbolUnion small for performance and
489 // memory usage reasons. 80 bytes is a soft limit based on the size of Defined
490 // on a 64-bit system.
491 static_assert(sizeof(SymbolUnion) <= 80, "SymbolUnion too large");
492 
493 template <typename T> struct AssertSymbol {
494   static_assert(std::is_trivially_destructible<T>(),
495                 "Symbol types must be trivially destructible");
496   static_assert(sizeof(T) <= sizeof(SymbolUnion), "SymbolUnion too small");
497   static_assert(alignof(T) <= alignof(SymbolUnion),
498                 "SymbolUnion not aligned enough");
499 };
500 
assertSymbols()501 static inline void assertSymbols() {
502   AssertSymbol<Defined>();
503   AssertSymbol<CommonSymbol>();
504   AssertSymbol<Undefined>();
505   AssertSymbol<SharedSymbol>();
506   AssertSymbol<LazyArchive>();
507   AssertSymbol<LazyObject>();
508 }
509 
510 void printTraceSymbol(const Symbol *sym);
511 
getSymbolSize()512 size_t Symbol::getSymbolSize() const {
513   switch (kind()) {
514   case CommonKind:
515     return sizeof(CommonSymbol);
516   case DefinedKind:
517     return sizeof(Defined);
518   case LazyArchiveKind:
519     return sizeof(LazyArchive);
520   case LazyObjectKind:
521     return sizeof(LazyObject);
522   case SharedKind:
523     return sizeof(SharedSymbol);
524   case UndefinedKind:
525     return sizeof(Undefined);
526   case PlaceholderKind:
527     return sizeof(Symbol);
528   }
529   llvm_unreachable("unknown symbol kind");
530 }
531 
532 // replace() replaces "this" object with a given symbol by memcpy'ing
533 // it over to "this". This function is called as a result of name
534 // resolution, e.g. to replace an undefind symbol with a defined symbol.
replace(const Symbol & newSym)535 void Symbol::replace(const Symbol &newSym) {
536   using llvm::ELF::STT_TLS;
537 
538   // st_value of STT_TLS represents the assigned offset, not the actual address
539   // which is used by STT_FUNC and STT_OBJECT. STT_TLS symbols can only be
540   // referenced by special TLS relocations. It is usually an error if a STT_TLS
541   // symbol is replaced by a non-STT_TLS symbol, vice versa. There are two
542   // exceptions: (a) a STT_NOTYPE lazy/undefined symbol can be replaced by a
543   // STT_TLS symbol, (b) a STT_TLS undefined symbol can be replaced by a
544   // STT_NOTYPE lazy symbol.
545   if (symbolKind != PlaceholderKind && !newSym.isLazy() &&
546       (type == STT_TLS) != (newSym.type == STT_TLS) &&
547       type != llvm::ELF::STT_NOTYPE)
548     error("TLS attribute mismatch: " + toString(*this) + "\n>>> defined in " +
549           toString(newSym.file) + "\n>>> defined in " + toString(file));
550 
551   Symbol old = *this;
552   memcpy(this, &newSym, newSym.getSymbolSize());
553 
554   // old may be a placeholder. The referenced fields must be initialized in
555   // SymbolTable::insert.
556   versionId = old.versionId;
557   visibility = old.visibility;
558   isUsedInRegularObj = old.isUsedInRegularObj;
559   exportDynamic = old.exportDynamic;
560   inDynamicList = old.inDynamicList;
561   canInline = old.canInline;
562   referenced = old.referenced;
563   traced = old.traced;
564   isPreemptible = old.isPreemptible;
565   scriptDefined = old.scriptDefined;
566   partition = old.partition;
567 
568   // Symbol length is computed lazily. If we already know a symbol length,
569   // propagate it.
570   if (nameData == old.nameData && nameSize == 0 && old.nameSize != 0)
571     nameSize = old.nameSize;
572 
573   // Print out a log message if --trace-symbol was specified.
574   // This is for debugging.
575   if (traced)
576     printTraceSymbol(this);
577 }
578 
579 void maybeWarnUnorderableSymbol(const Symbol *sym);
580 bool computeIsPreemptible(const Symbol &sym);
581 void reportBackrefs();
582 
583 // A mapping from a symbol to an InputFile referencing it backward. Used by
584 // --warn-backrefs.
585 extern llvm::DenseMap<const Symbol *, const InputFile *> backwardReferences;
586 
587 } // namespace elf
588 } // namespace lld
589 
590 #endif
591