[llvm] r294594 - Object: add a comment explaining a divergence

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 9 07:47:58 PST 2017


Author: compnerd
Date: Thu Feb  9 09:47:58 2017
New Revision: 294594

URL: http://llvm.org/viewvc/llvm-project?rev=294594&view=rev
Log:
Object: add a comment explaining a divergence

Add a note about the reason for the divergence from the specification
for ld64.  Addresses post-commit review comments from Davide.  NFC.

Modified:
    llvm/trunk/lib/Object/ArchiveWriter.cpp

Modified: llvm/trunk/lib/Object/ArchiveWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/ArchiveWriter.cpp?rev=294594&r1=294593&r2=294594&view=diff
==============================================================================
--- llvm/trunk/lib/Object/ArchiveWriter.cpp (original)
+++ llvm/trunk/lib/Object/ArchiveWriter.cpp Thu Feb  9 09:47:58 2017
@@ -316,6 +316,8 @@ writeSymbolTable(raw_fd_ostream &Out, ob
   if (HeaderStartOffset == 0)
     return 0;
 
+  // ld64 prefers the cctools type archive which pads its string table to a
+  // boundary of sizeof(int32_t).
   if (Kind == object::Archive::K_BSD)
     for (unsigned P = OffsetToAlignment(NameOS.tell(), sizeof(int32_t)); P--;)
       NameOS << '\0';




More information about the llvm-commits mailing list