Parcourir la source

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294594 91177308-0d34-0410-b5e6-96231b3b80d8
Saleem Abdulrasool il y a 8 ans
Parent
commit
1cf80ab83c
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      lib/Object/ArchiveWriter.cpp

+ 2 - 0
lib/Object/ArchiveWriter.cpp

@@ -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';