1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | elf-dump --dump-section-data | FileCheck %s
6 // Test that this produces a regular local symbol.
11 // CHECK: ('st_name', 0x00000001) # 'common1'
12 // CHECK-NEXT: ('st_bind', 0x0)
13 // CHECK-NEXT: ('st_type', 0x1)
14 // CHECK-NEXT: ('st_other', 0x00)
15 // CHECK-NEXT: ('st_shndx',
16 // CHECK-NEXT: ('st_value', 0x0000000000000000)
17 // CHECK-NEXT: ('st_size', 0x0000000000000001)
20 // Same as common1, but with directives in a different order.
25 // CHECK: ('st_name', 0x00000009) # 'common2'
26 // CHECK-NEXT: ('st_bind', 0x0)
27 // CHECK-NEXT: ('st_type', 0x1)
28 // CHECK-NEXT: ('st_other', 0x00)
29 // CHECK-NEXT: ('st_shndx',
30 // CHECK-NEXT: ('st_value', 0x0000000000000001)
31 // CHECK-NEXT: ('st_size', 0x0000000000000001)
37 // CHECK-NEXT: (('st_name', 0x00000011) # 'common6'
38 // CHECK-NEXT: ('st_bind', 0x0)
39 // CHECK-NEXT: ('st_type', 0x1)
40 // CHECK-NEXT: ('st_other', 0x00)
41 // CHECK-NEXT: ('st_shndx', 0x0004)
42 // CHECK-NEXT: ('st_value', 0x0000000000000010)
43 // CHECK-NEXT: ('st_size', 0x0000000000000008)
46 // Test that without an explicit .local we produce a global.
50 // CHECK: ('st_name', 0x00000019) # 'common3'
51 // CHECK-NEXT: ('st_bind', 0x1)
52 // CHECK-NEXT: ('st_type', 0x1)
53 // CHECK-NEXT: ('st_other', 0x00)
54 // CHECK-NEXT: ('st_shndx', 0xfff2)
55 // CHECK-NEXT: ('st_value', 0x0000000000000004)
56 // CHECK-NEXT: ('st_size', 0x0000000000000004)
59 // Test that without an explicit .local we produce a global, even if the first
60 // occurrence is not in a directive.
64 movsbl common4+3(%rip), %eax
70 // CHECK: ('st_name', 0x00000025) # 'common4'
71 // CHECK-NEXT: ('st_bind', 0x1)
72 // CHECK-NEXT: ('st_type', 0x1)
73 // CHECK-NEXT: ('st_other', 0x00)
74 // CHECK-NEXT: ('st_shndx', 0xfff2)
75 // CHECK-NEXT: ('st_value', 0x0000000000000010)
76 // CHECK-NEXT: ('st_size', 0x0000000000000028)
81 // CHECK-NEXT: (('st_name', 0x0000002d) # 'common5'
82 // CHECK-NEXT: ('st_bind', 0x1)
83 // CHECK-NEXT: ('st_type', 0x1)
84 // CHECK-NEXT: ('st_other', 0x00)
85 // CHECK-NEXT: ('st_shndx', 0xfff2)
86 // CHECK-NEXT: ('st_value', 0x0000000000000004)
87 // CHECK-NEXT: ('st_size', 0x0000000000000004)