[PATCH] D46628: [ELF] Add --strip-debug-non-line option

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 23 07:05:57 PDT 2018


probinson added a comment.

In https://reviews.llvm.org/D46628#1108997, @modocache wrote:

> In https://reviews.llvm.org/D46628#1095084, @probinson wrote:
>
> > Does gold really preserve .debug_info and .debug_abbrev?  Generally .debug_info is by far the largest DWARF section and so the one you most likely want to remove.
>
>
> Good point. `gold` doesn't remove those sections completely, but it does prune them. For example, here's the difference between `gold` and `gold --strip-debug-non-line` for a simple program: https://reviews.llvm.org/P8082


Ah ha.  And if the compile-unit DIE has DW_AT_ranges but .debug_ranges has been eliminated, that's a verifier error.  LLDB probably won't like it either.  Maybe the stripping function needs to become a little smarter.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D46628





More information about the llvm-commits mailing list