Make test more lenient for custom clang version strings
[llvm-project.git] / llvm / test / tools / llvm-objcopy / MachO / weaken-all.s
blob67244e85a2e6e5c366309b15f7a23dc23802e649
1 # REQUIRES: x86-registered-target
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-macos %s -o %t
5 # RUN: llvm-objcopy --weaken %t %t2
6 # RUN: llvm-readobj --symbols %t2 --sort-symbols=name | FileCheck %s
8 # CHECK: Symbols [
9 # CHECK-NEXT: Symbol {
10 # CHECK-NEXT: Name: _global ({{[0-9]+}})
11 # CHECK-NEXT: Extern
12 # CHECK-NEXT: Type: Section (0xE)
13 # CHECK-NEXT: Section: __text (0x1)
14 # CHECK-NEXT: RefType: UndefinedNonLazy (0x0)
15 # CHECK-NEXT: Flags [ (0x80)
16 # CHECK-NEXT: WeakDef (0x80)
17 # CHECK-NEXT: ]
18 # CHECK-NEXT: Value: 0x0
19 # CHECK-NEXT: }
20 # CHECK-NEXT: Symbol {
21 # CHECK-NEXT: Name: _global_data ({{[0-9]+}})
22 # CHECK-NEXT: Extern
23 # CHECK-NEXT: Type: Section (0xE)
24 # CHECK-NEXT: Section: __const (0x2)
25 # CHECK-NEXT: RefType: UndefinedNonLazy (0x0)
26 # CHECK-NEXT: Flags [ (0x80)
27 # CHECK-NEXT: WeakDef (0x80)
28 # CHECK-NEXT: ]
29 # CHECK-NEXT: Value: 0x0
30 # CHECK-NEXT: }
31 # CHECK-NEXT: Symbol {
32 # CHECK-NEXT: Name: _local ({{[0-9]+}})
33 # CHECK-NEXT: Type: Section (0xE)
34 # CHECK-NEXT: Section: __text (0x1)
35 # CHECK-NEXT: RefType: UndefinedNonLazy (0x0)
36 # CHECK-NEXT: Flags [ (0x0)
37 # CHECK-NEXT: ]
38 # CHECK-NEXT: Value: 0x0
39 # CHECK-NEXT: }
40 # CHECK-NEXT: Symbol {
41 # CHECK-NEXT: Name: _local_data ({{[0-9]+}})
42 # CHECK-NEXT: Type: Section (0xE)
43 # CHECK-NEXT: Section: __const (0x2)
44 # CHECK-NEXT: RefType: UndefinedNonLazy (0x0)
45 # CHECK-NEXT: Flags [ (0x0)
46 # CHECK-NEXT: ]
47 # CHECK-NEXT: Value: 0x0
48 # CHECK-NEXT: }
49 # CHECK-NEXT: Symbol {
50 # CHECK-NEXT: Name: _weak ({{[0-9]+}})
51 # CHECK-NEXT: Type: Section (0xE)
52 # CHECK-NEXT: Section: __text (0x1)
53 # CHECK-NEXT: RefType: UndefinedNonLazy (0x0)
54 # CHECK-NEXT: Flags [ (0x80)
55 # CHECK-NEXT: WeakDef (0x80)
56 # CHECK-NEXT: ]
57 # CHECK-NEXT: Value: 0x0
58 # CHECK-NEXT: }
59 # CHECK-NEXT: Symbol {
60 # CHECK-NEXT: Name: _weak_data ({{[0-9]+}})
61 # CHECK-NEXT: Type: Section (0xE)
62 # CHECK-NEXT: Section: __const (0x2)
63 # CHECK-NEXT: RefType: UndefinedNonLazy (0x0)
64 # CHECK-NEXT: Flags [ (0x80)
65 # CHECK-NEXT: WeakDef (0x80)
66 # CHECK-NEXT: ]
67 # CHECK-NEXT: Value: 0x0
68 # CHECK-NEXT: }
69 # CHECK-NEXT: Symbol {
70 # CHECK-NEXT: Name: _weak_global ({{[0-9]+}})
71 # CHECK-NEXT: Extern
72 # CHECK-NEXT: Type: Section (0xE)
73 # CHECK-NEXT: Section: __text (0x1)
74 # CHECK-NEXT: RefType: UndefinedNonLazy (0x0)
75 # CHECK-NEXT: Flags [ (0x80)
76 # CHECK-NEXT: WeakDef (0x80)
77 # CHECK-NEXT: ]
78 # CHECK-NEXT: Value: 0x0
79 # CHECK-NEXT: }
80 # CHECK-NEXT: ]
82 .globl _global
83 _global:
85 _local:
87 .weak_definition _weak
88 _weak:
90 .weak_definition _weak_global
91 .globl _weak_global
92 _weak_global:
94 .section __TEXT,__const
95 .globl _global_data
96 _global_data:
97 _local_data:
99 .weak_definition _weak_data
100 _weak_data: