]> granicus.if.org Git - llvm/commitdiff
Object: add a comment explaining a divergence
authorSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 9 Feb 2017 15:47:58 +0000 (15:47 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 9 Feb 2017 15:47:58 +0000 (15:47 +0000)
Add a note about the reason for the divergence from the specification
for ld64.  Addresses post-commit review comments from Davide.  NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294594 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Object/ArchiveWriter.cpp

index ed4ef6a8df4a64854d917791842cc130f32291e8..45047240c3b0c5334366277b6c0fbac7902d294e 100644 (file)
@@ -316,6 +316,8 @@ writeSymbolTable(raw_fd_ostream &Out, object::Archive::Kind Kind,
   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';