summaryrefslogtreecommitdiff
path: root/test/ELF/common-gc3.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/ELF/common-gc3.s')
-rw-r--r--test/ELF/common-gc3.s18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/ELF/common-gc3.s b/test/ELF/common-gc3.s
new file mode 100644
index 0000000000000..e161a635c0776
--- /dev/null
+++ b/test/ELF/common-gc3.s
@@ -0,0 +1,18 @@
+# REQUIRES: x86
+# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
+# RUN: ld.lld %t.o -o %t1 --gc-sections
+# RUN: llvm-objdump -s %t1 | FileCheck %s
+
+# CHECK: Contents of section .noalloc:
+# 0000 00000000 00000000 ........
+
+ .section .text._start,"ax",@progbits
+ .globl _start
+_start:
+ retq
+
+ .type unused,@object
+ .comm unused,4,4
+
+ .section .noalloc,"",@progbits
+ .quad unused