[PATCH] D13286: [ELF2] Add --[no-]whole-archive command line switches

Igor Kudrin via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 1 10:15:03 PDT 2015


ikudrin marked an inline comment as done.

================
Comment at: ELF/SymbolTable.cpp:33-36
@@ -34,1 +32,6 @@
+    File.release();
+    // ArchiveFile should be kept in both cases:
+    // * WholeArchive: it might be a thin archive which holds actual
+    //   memory buffers of its members.
+    // * !WholeArchive: it holds lazy symbols.
     ArchiveFiles.emplace_back(AF);
----------------
ruiu wrote:
> Is that true? MemoryBuffers are not freed until the end of Driver, so it should be safe if thin archives have references to MemoryBuffers.
A thin archive holds just names of the external files. These files are opened and their memory buffers are stored within the instance of Archive class, not in Driver.


http://reviews.llvm.org/D13286





More information about the llvm-commits mailing list