diff options
| author | Fangrui Song <maskray@google.com> | 2018-07-31 21:26:35 +0000 |
|---|---|---|
| committer | Fangrui Song <maskray@google.com> | 2018-07-31 21:26:35 +0000 |
| commit | 87b4b8f7b437ab39f055bf4d740f0ca906aa122d (patch) | |
| tree | bacc2616f157dd1d0c78aeb9cdc0314f2d9c6453 /llvm/test | |
| parent | 497e8fad51394239189bc0d7b0393b95e4fd7d67 (diff) | |
| download | bcm5719-llvm-87b4b8f7b437ab39f055bf4d740f0ca906aa122d.tar.gz bcm5719-llvm-87b4b8f7b437ab39f055bf4d740f0ca906aa122d.zip | |
[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
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/tools/llvm-objcopy/strip-debug.test | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/test/tools/llvm-objcopy/strip-debug.test b/llvm/test/tools/llvm-objcopy/strip-debug.test index c8f90d9ca19..6c833f301c7 100644 --- a/llvm/test/tools/llvm-objcopy/strip-debug.test +++ b/llvm/test/tools/llvm-objcopy/strip-debug.test @@ -67,7 +67,7 @@ # RUN: llvm-objcopy --strip-debug %t.thin.a %t2.thin.a # RUN: cat %t.thin.a | FileCheck %s --check-prefix=VERIFY-THIN-ARCHIVE # RUN: cat %t2.thin.a | FileCheck %s --check-prefix=VERIFY-THIN-ARCHIVE - + # VERIFY-THIN-ARCHIVE: !<thin> # Verify that the member of a thin archive was properly modified. @@ -94,6 +94,12 @@ Sections: - Name: .debugfoo Type: SHT_PROGBITS Content: "00000000" + - Name: .zdebugfoo + Type: SHT_PROGBITS + Content: "00000000" + - Name: .gdb_index + Type: SHT_PROGBITS + Content: "00000000" - Name: .text Type: SHT_PROGBITS Flags: [ SHF_ALLOC, SHF_EXECINSTR ] |

