diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2016-02-05 15:03:10 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2016-02-05 15:03:10 +0000 |
| commit | d30eb7d77d318e5e12a9972a09b79e60fa7182d1 (patch) | |
| tree | d1eba580048d79d4a107af55c8d79e0bf194059c /lld/ELF/OutputSections.cpp | |
| parent | d389c7a3ccf0108999620cfbe0ef352d18a65f59 (diff) | |
| download | bcm5719-llvm-d30eb7d77d318e5e12a9972a09b79e60fa7182d1.tar.gz bcm5719-llvm-d30eb7d77d318e5e12a9972a09b79e60fa7182d1.zip | |
Centralize most calls to setUsedInDynamicReloc.
llvm-svn: 259887
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
| -rw-r--r-- | lld/ELF/OutputSections.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 22470c107ac..0565f36a561 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -216,6 +216,14 @@ RelocationSection<ELFT>::RelocationSection(StringRef Name, bool IsRela) } template <class ELFT> +void RelocationSection<ELFT>::addReloc(const DynamicReloc<ELFT> &Reloc) { + SymbolBody *Sym = Reloc.Sym; + if (!Reloc.UseSymVA && Sym) + Sym->setUsedInDynamicReloc(); + Relocs.push_back(Reloc); +} + +template <class ELFT> static typename ELFFile<ELFT>::uintX_t getOffset(const DynamicReloc<ELFT> &Rel) { typedef typename ELFFile<ELFT>::uintX_t uintX_t; |

