summaryrefslogtreecommitdiff
path: root/test/ELF/gnu-unique.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/ELF/gnu-unique.s')
-rw-r--r--test/ELF/gnu-unique.s24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/ELF/gnu-unique.s b/test/ELF/gnu-unique.s
new file mode 100644
index 000000000000..f7206cf8c97f
--- /dev/null
+++ b/test/ELF/gnu-unique.s
@@ -0,0 +1,24 @@
+// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
+// RUN: ld.lld %t -shared -o %tout.so
+// RUN: llvm-readobj -dyn-symbols %tout.so | FileCheck %s
+// REQUIRES: x86
+
+// Check that STB_GNU_UNIQUE is treated as a global and ends up in the dynamic
+// symbol table as STB_GNU_UNIQUE.
+
+.global _start
+.text
+_start:
+
+.data
+.type symb, @gnu_unique_object
+symb:
+
+# CHECK: Name: symb@
+# CHECK-NEXT: Value:
+# CHECK-NEXT: Size: 0
+# CHECK-NEXT: Binding: Unique
+# CHECK-NEXT: Type: Object
+# CHECK-NEXT: Other: 0
+# CHECK-NEXT: Section: .data
+# CHECK-NEXT: }