[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

Rui Ueyama via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 30 14:04:14 PST 2018


ruiu added a comment.

But 2GB is perhaps still too big and I guess a large part of it can be for dead sections. If we fix this, I'd like to fix it in a proper way so that we can completely eliminate debug info for dead sections.

rocallahan, can I ask why Rust passes all object files to the linker and use `-gc-sections` to eliminate unused part of these files?

One possible way to fix it is to pass `--start-lib` to the linker before any object file paths in the command line. That option gives archive file semantics to object files, so if you option, each object file is treated as if that were in an archive file containing that the single object file. (Note that `--start-lib` is a positional option just like `--start-group`, so all files between `--start-lib` and `--end-lib` get that special treament.)


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D54747





More information about the lldb-commits mailing list