[PATCH] D119074: [ELF] Parse archives as --start-lib object files

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 15 09:40:28 PST 2022


MaskRay added inline comments.


================
Comment at: lld/ELF/Driver.cpp:233
+    archiveFiles.emplace_back(path, members.size());
 
     // All files within the archive get the same group ID to allow mutual
----------------
peter.smith wrote:
> Is it worth a design decision comment here? I'm thinking of people new to LLD wondering where the traditional archive handling code is.
> 
> For example
> ```LLD chooses to handle archives and --start-lib and --end-lib using the same code-path. This scans all the ELF files in the archive rather than just the index file, with the benefit that the symbols are only loaded once. For many projects archives see high utilization rates so in these cases it is a net performance win.```
Thanks  for the suggestion!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119074/new/

https://reviews.llvm.org/D119074



More information about the llvm-commits mailing list