[llvm-objcopy] Make --strip-debug strip .gdb_index
authorFangrui Song <maskray@google.com>
Tue, 31 Jul 2018 21:26:35 +0000 (21:26 +0000)
committerFangrui Song <maskray@google.com>
Tue, 31 Jul 2018 21:26:35 +0000 (21:26 +0000)
commit87b4b8f7b437ab39f055bf4d740f0ca906aa122d
treebacc2616f157dd1d0c78aeb9cdc0314f2d9c6453
parent497e8fad51394239189bc0d7b0393b95e4fd7d67
[llvm-objcopy] Make --strip-debug strip .gdb_index

Summary:
See binutils-gdb/bfd/elf.c, GNU objcopy also strips .stab* (STABS)
.line* (DWARF 1) .gnu.linkonce.wi.* (linkonce section for .debug_info) but
I'm not sure we need to be compatible with it.

Reviewers: dblaikie, alexshap, jakehehrlich, jhenderson

Reviewed By: alexshap, jakehehrlich

Subscribers: aprantl, JDevlieghere, jakehehrlich, llvm-commits

Differential Revision: https://reviews.llvm.org/D50100

llvm-svn: 338443
llvm/test/tools/llvm-objcopy/strip-debug.test
llvm/tools/llvm-objcopy/llvm-objcopy.cpp