[PATCH] D74169: [WIP][LLD][ELF][DebugInfo] Skeleton implementation of removing obsolete debug info.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 20 12:28:55 PST 2020


dblaikie added a comment.

In D74169#1883671 <https://reviews.llvm.org/D74169#1883671>, @avl wrote:

> >>   On one side, I've heard thoughts that:
> >>    (1) if we use -gsplit-dwarf, is .debug* garbage collection still valuable?
> > 
> > For users using -gsplit-dwarf, linker garbage collection provides zero value. But not everyone does, there are reasons to use one or the other in different situations.
>
> also, as an theoretical alternative - probably we might want to implement -gsplit-dwarf so that it include only used part of debug info. i.e. that which referenced after garbage collection. As the result size of all .dwo files would be smaller.


That's not possible - the .dwo files are produced during compilation time, before the linker has done any garbage collection.

(currently even when building the dwp file from dwo files it's not possible to strip the dead debug info - since there's no feedback from the linker that reaches the dwp tool (dwp and linking might be done in parallel on different machines, for instance) - but it'd be possible to implement something more like dsymutil where the linker generates a side-file address mapping/details of the garbage collection and then that is fed into the dwp tool (this would delay running the dwp tool though))


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74169





More information about the llvm-commits mailing list