diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2017-12-20 16:28:19 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2017-12-20 16:28:19 +0000 |
| commit | a32ddc463965498df32e86b2b3b23047af262bcd (patch) | |
| tree | 1642c22e9318c4afe87b3db8c4ef97d5dc9f1319 /lld/ELF/SyntheticSections.cpp | |
| parent | 7b5cc6c5dc0703860abf4d8c5bb1c06f30c86f82 (diff) | |
| download | bcm5719-llvm-a32ddc463965498df32e86b2b3b23047af262bcd.tar.gz bcm5719-llvm-a32ddc463965498df32e86b2b3b23047af262bcd.zip | |
Use a reference for the shared symbol file.
Every shared symbol has a file, so we can use a reference.
llvm-svn: 321187
Diffstat (limited to 'lld/ELF/SyntheticSections.cpp')
| -rw-r--r-- | lld/ELF/SyntheticSections.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index 0979e04b6a4..25dc250df51 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -2299,8 +2299,8 @@ VersionNeedSection<ELFT>::VersionNeedSection() template <class ELFT> void VersionNeedSection<ELFT>::addSymbol(SharedSymbol *SS) { - SharedFile<ELFT> *File = SS->getFile<ELFT>(); - const typename ELFT::Verdef *Ver = File->Verdefs[SS->VerdefIndex]; + SharedFile<ELFT> &File = SS->getFile<ELFT>(); + const typename ELFT::Verdef *Ver = File.Verdefs[SS->VerdefIndex]; if (!Ver) { SS->VersionId = VER_NDX_GLOBAL; return; @@ -2309,14 +2309,14 @@ void VersionNeedSection<ELFT>::addSymbol(SharedSymbol *SS) { // If we don't already know that we need an Elf_Verneed for this DSO, prepare // to create one by adding it to our needed list and creating a dynstr entry // for the soname. - if (File->VerdefMap.empty()) - Needed.push_back({File, InX::DynStrTab->addString(File->SoName)}); - typename SharedFile<ELFT>::NeededVer &NV = File->VerdefMap[Ver]; + if (File.VerdefMap.empty()) + Needed.push_back({&File, InX::DynStrTab->addString(File.SoName)}); + typename SharedFile<ELFT>::NeededVer &NV = File.VerdefMap[Ver]; // If we don't already know that we need an Elf_Vernaux for this Elf_Verdef, // prepare to create one by allocating a version identifier and creating a // dynstr entry for the version name. if (NV.Index == 0) { - NV.StrTab = InX::DynStrTab->addString(File->getStringTable().data() + + NV.StrTab = InX::DynStrTab->addString(File.getStringTable().data() + Ver->getAux()->vda_name); NV.Index = NextIndex++; } |

