From: Saleem Abdulrasool Date: Thu, 9 Feb 2017 15:47:58 +0000 (+0000) Subject: Object: add a comment explaining a divergence X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1cf80ab83c8b6df83297ee971dfb2c3aa57a2fb6;p=llvm 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 --- diff --git a/lib/Object/ArchiveWriter.cpp b/lib/Object/ArchiveWriter.cpp index ed4ef6a8df4..45047240c3b 100644 --- a/lib/Object/ArchiveWriter.cpp +++ b/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';