[lld] r275530 - Update comments.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 14 21:57:45 PDT 2016


Author: ruiu
Date: Thu Jul 14 23:57:44 2016
New Revision: 275530

URL: http://llvm.org/viewvc/llvm-project?rev=275530&view=rev
Log:
Update comments.

Modified:
    lld/trunk/ELF/InputFiles.cpp

Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=275530&r1=275529&r2=275530&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Thu Jul 14 23:57:44 2016
@@ -308,10 +308,12 @@ elf::ObjectFile<ELFT>::createInputSectio
     }
   }
 
-  // We dont need special handling of .eh_frame sections if relocatable
-  // output was choosen. Proccess them as usual input sections.
-  if (!Config->Relocatable && Name == ".eh_frame")
+  // The linker merges EH (exception handling) frames and creates a
+  // .eh_frame_hdr section for runtime. So we handle them with a special
+  // class. For relocatable outputs, they are just passed through.
+  if (Name == ".eh_frame" && !Config->Relocatable)
     return new (EHAlloc.Allocate()) EhInputSection<ELFT>(this, &Sec);
+
   if (shouldMerge<ELFT>(Sec))
     return new (MAlloc.Allocate()) MergeInputSection<ELFT>(this, &Sec);
   return new (IAlloc.Allocate()) InputSection<ELFT>(this, &Sec);




More information about the llvm-commits mailing list