diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-02-09 15:47:58 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-02-09 15:47:58 +0000 |
commit | d3faeaf8a292a566603fcbab803fe16f802bcf12 (patch) | |
tree | a60c209bffaba9b2fd1db2bad9d8ec5c033e03c0 /llvm/lib/Object/ArchiveWriter.cpp | |
parent | 93e773e9be0e901bd823439e4eedffba342ad8f9 (diff) | |
download | bcm5719-llvm-d3faeaf8a292a566603fcbab803fe16f802bcf12.tar.gz bcm5719-llvm-d3faeaf8a292a566603fcbab803fe16f802bcf12.zip |
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
Diffstat (limited to 'llvm/lib/Object/ArchiveWriter.cpp')
-rw-r--r-- | llvm/lib/Object/ArchiveWriter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Object/ArchiveWriter.cpp b/llvm/lib/Object/ArchiveWriter.cpp index ed4ef6a8df4..45047240c3b 100644 --- a/llvm/lib/Object/ArchiveWriter.cpp +++ b/llvm/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'; |