[lld] r295408 - Rename getAliases -> getSymbolsAt.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 16 19:34:17 PST 2017


Author: ruiu
Date: Thu Feb 16 21:34:17 2017
New Revision: 295408

URL: http://llvm.org/viewvc/llvm-project?rev=295408&view=rev
Log:
Rename getAliases -> getSymbolsAt.

The previous name caused a little confusion because the function not
only returns aliases but a given symbol itself too.

Modified:
    lld/trunk/ELF/Relocations.cpp

Modified: lld/trunk/ELF/Relocations.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Relocations.cpp?rev=295408&r1=295407&r2=295408&view=diff
==============================================================================
--- lld/trunk/ELF/Relocations.cpp (original)
+++ lld/trunk/ELF/Relocations.cpp Thu Feb 16 21:34:17 2017
@@ -413,13 +413,13 @@ template <class ELFT> static bool isRead
   return false;
 }
 
-// Returns symbols at the same offset as a given symbol.
+// Returns symbols at the same offset as a given symbol, including SS itself.
 //
 // If two or more symbols are at the same offset, and at least one of
 // them are copied by a copy relocation, all of them need to be copied.
 // Otherwise, they would refer different places at runtime.
 template <class ELFT>
-static std::vector<SharedSymbol<ELFT> *> getAliases(SharedSymbol<ELFT> *SS) {
+static std::vector<SharedSymbol<ELFT> *> getSymbolsAt(SharedSymbol<ELFT> *SS) {
   typedef typename ELFT::Sym Elf_Sym;
 
   std::vector<SharedSymbol<ELFT> *> Ret;
@@ -456,7 +456,7 @@ template <class ELFT> static void addCop
   // Look through the DSO's dynamic symbol table for aliases and create a
   // dynamic symbol for each one. This causes the copy relocation to correctly
   // interpose any aliases.
-  for (SharedSymbol<ELFT> *Alias : getAliases(SS)) {
+  for (SharedSymbol<ELFT> *Alias : getSymbolsAt(SS)) {
     Alias->NeedsCopy = true;
     Alias->Section = ISec;
     Alias->symbol()->IsUsedInRegularObj = true;




More information about the llvm-commits mailing list