[PATCH] D95727: llvm-shlib: Create object libraries for each component and link against them
Tom Stellard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 1 21:40:23 PDT 2021
tstellar added a comment.
In D95727#3076485 <https://reviews.llvm.org/D95727#3076485>, @MaskRay wrote:
>> 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 about its semantics.
What do I need to do in order to avoid changing the output of lld and gold with this patch? Can I wrap the whole list of object files with -Wl,--start-lib and -Wl,--end-lib or do I need to have multiple --start-lib and --end-lib pairs, one for each original static archive?
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