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.
llvm-svn: 294594
diff --git a/llvm/lib/Object/ArchiveWriter.cpp b/llvm/lib/Object/ArchiveWriter.cpp
index ed4ef6a..4504724 100644
--- a/llvm/lib/Object/ArchiveWriter.cpp
+++ b/llvm/lib/Object/ArchiveWriter.cpp
@@ -316,6 +316,8 @@
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';