[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / ELF / weakref.s
blobd23d0fd715dfaaf8d59d4bfd4d377a6cad5f97ae
1 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s | llvm-readelf -s - | FileCheck %s
3 // This is a long test that checks that the aliases created by weakref are
4 // never in the symbol table and that the only case it causes a symbol to
5 // be output as a weak undefined symbol is if that variable is not defined
6 // in this file and all the references to it are done via the alias.
8 # CHECK: Num: Value Size Type Bind Vis Ndx Name
9 # CHECK-NEXT: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
10 # CHECK-NEXT: 1: 0000000000000000 0 SECTION LOCAL DEFAULT 2 .text
11 # CHECK-NEXT: 2: 0000000000000018 0 NOTYPE LOCAL DEFAULT 2 bar6
12 # CHECK-NEXT: 3: 0000000000000018 0 NOTYPE LOCAL DEFAULT 2 bar7
13 # CHECK-NEXT: 4: 000000000000001c 0 NOTYPE LOCAL DEFAULT 2 bar8
14 # CHECK-NEXT: 5: 0000000000000020 0 NOTYPE LOCAL DEFAULT 2 bar9
15 # CHECK-NEXT: 6: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND bar1
16 # CHECK-NEXT: 7: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND bar2
17 # CHECK-NEXT: 8: 0000000000000000 0 NOTYPE WEAK DEFAULT UND bar3
18 # CHECK-NEXT: 9: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND bar4
19 # CHECK-NEXT: 10: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND bar5
20 # CHECK-NEXT: 11: 0000000000000028 0 NOTYPE GLOBAL DEFAULT 2 bar10
21 # CHECK-NEXT: 12: 0000000000000030 0 NOTYPE GLOBAL DEFAULT 2 bar11
22 # CHECK-NEXT: 13: 0000000000000030 0 NOTYPE GLOBAL DEFAULT 2 bar12
23 # CHECK-NEXT: 14: 0000000000000034 0 NOTYPE GLOBAL DEFAULT 2 bar13
24 # CHECK-NEXT: 15: 0000000000000038 0 NOTYPE GLOBAL DEFAULT 2 bar14
25 # CHECK-NEXT: 16: 0000000000000040 0 NOTYPE GLOBAL DEFAULT 2 bar15
27 .weakref foo1, bar1
29 .weakref foo2, bar2
30 .long bar2
32 .weakref foo3, bar3
33 .long foo3
35 .weakref foo4, bar4
36 .long foo4
37 .long bar4
39 .weakref foo5, bar5
40 .long bar5
41 .long foo5
43 bar6:
44 .weakref foo6, bar6
46 bar7:
47 .weakref foo7, bar7
48 .long bar7
50 bar8:
51 .weakref foo8, bar8
52 .long foo8
54 bar9:
55 .weakref foo9, bar9
56 .long foo9
57 .long bar9
59 bar10:
60 .global bar10
61 .weakref foo10, bar10
62 .long bar10
63 .long foo10
65 bar11:
66 .global bar11
67 .weakref foo11, bar11
69 bar12:
70 .global bar12
71 .weakref foo12, bar12
72 .long bar12
74 bar13:
75 .global bar13
76 .weakref foo13, bar13
77 .long foo13
79 bar14:
80 .global bar14
81 .weakref foo14, bar14
82 .long foo14
83 .long bar14
85 bar15:
86 .global bar15
87 .weakref foo15, bar15
88 .long bar15
89 .long foo15