summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/strip-debug.s
diff options
context:
space:
mode:
Diffstat (limited to 'lld/test/ELF/strip-debug.s')
-rw-r--r--lld/test/ELF/strip-debug.s23
1 files changed, 23 insertions, 0 deletions
diff --git a/lld/test/ELF/strip-debug.s b/lld/test/ELF/strip-debug.s
new file mode 100644
index 00000000000..4075fe604e6
--- /dev/null
+++ b/lld/test/ELF/strip-debug.s
@@ -0,0 +1,23 @@
+# 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: ld.lld %t -o %t2 --strip-debug
+# RUN: llvm-readobj -sections -symbols %t2 | FileCheck -check-prefix=STRIP %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
+
+# STRIP-NOT: Name: .debug_info
+# STRIP-NOT: Name: .debug_abbrev
+# STRIP-NOT: Name: .debug_aranges
+# STRIP-NOT: Name: .debug_line
+
+.globl _start
+_start:
+ ret
OpenPOWER on IntegriCloud