1// REQUIRES: x86
2// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
3//
4// RUN: ld.lld %t -shared -o %tout.so
5// RUN: llvm-readobj -dyn-symbols %tout.so | FileCheck -check-prefix=GNU %s
6//
7// RUN: ld.lld %t -shared -o %tout.so --no-gnu-unique
8// RUN: llvm-readobj -dyn-symbols %tout.so | FileCheck -check-prefix=NO %s
9
10// Check that STB_GNU_UNIQUE is treated as a global and ends up in the dynamic
11// symbol table as STB_GNU_UNIQUE.
12
13.global _start
14.text
15_start:
16
17.data
18.type symb, @gnu_unique_object
19symb:
20
21# GNU:        Name: symb@
22# GNU-NEXT:   Value:
23# GNU-NEXT:   Size: 0
24# GNU-NEXT:   Binding: Unique
25# GNU-NEXT:   Type: Object
26# GNU-NEXT:   Other: 0
27# GNU-NEXT:   Section: .data
28# GNU-NEXT: }
29
30# NO:        Name: symb@
31# NO-NEXT:   Value:
32# NO-NEXT:   Size: 0
33# NO-NEXT:   Binding: Global
34# NO-NEXT:   Type: Object
35# NO-NEXT:   Other: 0
36# NO-NEXT:   Section: .data
37# NO-NEXT: }
38