[PATCH] D95727: llvm-shlib: Create object libraries for each component and link against them

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 20 14:18:38 PDT 2021


MaskRay added a comment.

> Is --start-lib something specific to lld? I did builds with binutils and libLLVM.so was the same size with and without this patch.

gold and ld.lld support `--start-lib` for a long time. (Bazel uses `--start-lib` by default.)
GNU ld feature request: https://sourceware.org/bugzilla/show_bug.cgi?id=24600

Switching away from archive semantics (http://maskray.me/blog/2021-06-20-symbol-processing) has the problem that unused `.debug_*` may be added to the output with gold and ld.lld.

GNU ld may have a rarely known heuristic to not add `.debug_*` if all text section are garbage collected but I am not clear with its semantics.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95727



More information about the llvm-commits mailing list