Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ELF] - Teach LLD to strip .zdebug_* sections when --strip-debug/--st…
…rip-all is specified. Currently we do not strip .zdebug_*, what looks wrong. Also this simplifies the testcase we have for this options. Differential revision: https://reviews.llvm.org/D39552 llvm-svn: 317306
- Loading branch information
George Rimar
committed
Nov 3, 2017
1 parent
5b26236
commit cbed0e6
Showing
2 changed files
with
10 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,14 @@ | ||
# REQUIRES: x86 | ||
|
||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux -g %s -o %t | ||
# RUN: ld.lld %t -o %t2 | ||
# RUN: llvm-readobj -sections -symbols %t2 | FileCheck -check-prefix=DEFAULT %s | ||
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t | ||
# RUN: ld.lld %t -o %t2 --strip-debug | ||
# RUN: llvm-readobj -sections -symbols %t2 | FileCheck -check-prefix=STRIP %s | ||
# RUN: llvm-readobj -sections %t2 | FileCheck %s | ||
# RUN: ld.lld %t -o %t2 -S | ||
# RUN: llvm-readobj -sections -symbols %t2 | FileCheck -check-prefix=STRIP %s | ||
# RUN: llvm-readobj -sections %t2 | FileCheck %s | ||
# RUN: ld.lld %t -o %t2 --strip-all | ||
# RUN: llvm-readobj -sections -symbols %t2 | FileCheck -check-prefix=STRIP %s | ||
|
||
# DEFAULT: Name: .debug_info | ||
# DEFAULT: Name: .debug_abbrev | ||
# DEFAULT: Name: .debug_aranges | ||
# DEFAULT: Name: .debug_line | ||
# RUN: llvm-readobj -sections %t2 | FileCheck %s | ||
|
||
# STRIP-NOT: Name: .debug_info | ||
# STRIP-NOT: Name: .debug_abbrev | ||
# STRIP-NOT: Name: .debug_aranges | ||
# STRIP-NOT: Name: .debug_line | ||
# CHECK-NOT: Foo | ||
# CHECK-NOT: Bar | ||
|
||
.globl _start | ||
_start: | ||
ret | ||
.section .debug_Foo,"",@progbits | ||
.section .zdebug_Bar,"",@progbits |