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
10 # CHECK-NEXT: Name: _global ({{[0-9]+}})
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)
18 # CHECK-NEXT: Value: 0x0
20 # CHECK-NEXT: Symbol {
21 # CHECK-NEXT: Name: _global_data ({{[0-9]+}})
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)
29 # CHECK-NEXT: Value: 0x0
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)
38 # CHECK-NEXT: Value: 0x0
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)
47 # CHECK-NEXT: Value: 0x0
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)
57 # CHECK-NEXT: Value: 0x0
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)
67 # CHECK-NEXT: Value: 0x0
69 # CHECK-NEXT: Symbol {
70 # CHECK-NEXT: Name: _weak_global ({{[0-9]+}})
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)
78 # CHECK-NEXT: Value: 0x0
87 .weak_definition _weak
90 .weak_definition _weak_global
94 .section __TEXT,__const
99 .weak_definition _weak_data