[lld] r330967 - Add a comment. NFC.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 26 11:03:05 PDT 2018


Author: rafael
Date: Thu Apr 26 11:03:04 2018
New Revision: 330967

URL: http://llvm.org/viewvc/llvm-project?rev=330967&view=rev
Log:
Add a comment. NFC.

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=330967&r1=330966&r2=330967&view=diff
==============================================================================
--- lld/trunk/ELF/Relocations.cpp (original)
+++ lld/trunk/ELF/Relocations.cpp Thu Apr 26 11:03:04 2018
@@ -461,6 +461,11 @@ static std::vector<SharedSymbol *> getSy
   return Ret;
 }
 
+// When a symbol is copy relocated or we create a canonical plt entry, it is
+// effectively a defined symbol. In the case of copy relocation the symbol is
+// in .bss and in the case of a canonical plt entry it is in .plt. This function
+// replaces the existing symbol with a Defined pointing to the appropriate
+// location.
 static void replaceWithDefined(Symbol &Sym, SectionBase *Sec, uint64_t Value,
                                uint64_t Size) {
   Symbol Old = Sym;




More information about the llvm-commits mailing list