[PATCH] D78983: [ELF] Add --print-archive-stats=
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 27 23:57:28 PDT 2020
MaskRay created this revision.
MaskRay added reviewers: grimar, psmith, ruiu.
Herald added subscribers: llvm-commits, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
gold has an option --print-symbol-counts= which prints:
// For each archive
archive $archive $members $fetched_members
// For each object file
symbols $object $defined_symbols $used_defined_symbols
In most cases, `$defined_symbols = $used_defined_symbols` unless weak
symbols are present. The `symbols` lines do not appear to be useful.
`archive` lines are useful: `$fetched_members=0` lines correspond to
unused archives. The information can be used to trim dependencies.
This patch implements --print-archive-stats= which prints the number of
members and the number of fetched members for each archive.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D78983
Files:
lld/ELF/Config.h
lld/ELF/Driver.cpp
lld/ELF/Driver.h
lld/ELF/InputFiles.cpp
lld/ELF/InputFiles.h
lld/ELF/MapFile.cpp
lld/ELF/MapFile.h
lld/ELF/Options.td
lld/ELF/Writer.cpp
lld/docs/ld.lld.1
lld/test/ELF/print-archive-stats.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78983.260548.patch
Type: text/x-patch
Size: 6739 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200428/e130748a/attachment.bin>
More information about the llvm-commits
mailing list