[PATCH] D13286: [ELF2] Add --[no-]whole-archive command line switches
Igor Kudrin via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 1 06:46:20 PDT 2015
ikudrin added inline comments.
================
Comment at: ELF/SymbolTable.cpp:33
@@ -34,1 +32,3 @@
+ File.release();
ArchiveFiles.emplace_back(AF);
+ if (Config->WholeArchive) {
----------------
ruiu wrote:
> Do not push archive file objects to the vector if WholeArchive is true. If --whole-archive is set, archive files are treated as if they did not exist.
If I understand it right, Archive::Child::getBuffer() can, under certain circumstances, create a new memory buffer and return its reference. This memory buffer is stored in the ThinBuffers member of the instance of Archive. That's why we need to hold Archive through holding ArchiveFile.
http://reviews.llvm.org/D13286
More information about the llvm-commits
mailing list