[lld] r295388 - Add a comment.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 16 16:40:44 PST 2017


Author: ruiu
Date: Thu Feb 16 18:40:44 2017
New Revision: 295388

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

Modified:
    lld/trunk/ELF/Writer.cpp

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=295388&r1=295387&r2=295388&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Thu Feb 16 18:40:44 2017
@@ -98,6 +98,9 @@ StringRef elf::getOutputSectionName(Stri
   if (Config->Relocatable)
     return Name;
 
+  // If -emit-relocs is given (which is rare), we need to copy
+  // relocation sections to the output. If input section .foo is
+  // output as .bar, we want to rename .rel.foo .rel.bar as well.
   if (Config->EmitRelocs) {
     for (StringRef V : {".rel.", ".rela."}) {
       if (Name.startswith(V)) {




More information about the llvm-commits mailing list