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', 1) # 'common1'
12 // CHECK-NEXT: ('st_bind', 0)
13 // CHECK-NEXT: ('st_type', 1)
14 // CHECK-NEXT: ('st_other', 0)
15 // CHECK-NEXT: ('st_shndx',
16 // CHECK-NEXT: ('st_value', 0)
17 // CHECK-NEXT: ('st_size', 1)
20 // Same as common1, but with directives in a different order.
25 // CHECK: ('st_name', 9) # 'common2'
26 // CHECK-NEXT: ('st_bind', 0)
27 // CHECK-NEXT: ('st_type', 1)
28 // CHECK-NEXT: ('st_other', 0)
29 // CHECK-NEXT: ('st_shndx',
30 // CHECK-NEXT: ('st_value', 1)
31 // CHECK-NEXT: ('st_size', 1)
33 // Test that without an explicit .local we produce a global.
37 // CHECK: ('st_name', 17) # 'common3'
38 // CHECK-NEXT: ('st_bind', 1)
39 // CHECK-NEXT: ('st_type', 1)
40 // CHECK-NEXT: ('st_other', 0)
41 // CHECK-NEXT: ('st_shndx', 65522)
42 // CHECK-NEXT: ('st_value', 4)
43 // CHECK-NEXT: ('st_size', 4)
46 // Test that without an explicit .local we produce a global, even if the first
47 // occurrence is not in a directive.
51 movsbl common4+3(%rip), %eax
57 // CHECK: ('st_name', 29) # 'common4'
58 // CHECK-NEXT: ('st_bind', 1)
59 // CHECK-NEXT: ('st_type', 1)
60 // CHECK-NEXT: ('st_other', 0)
61 // CHECK-NEXT: ('st_shndx', 65522)
62 // CHECK-NEXT: ('st_value', 16)
63 // CHECK-NEXT: ('st_size', 40)