1// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck  %s
2
3// Test that we emit the correct value.
4
5.set kernbase,0xffffffff80000000
6
7// CHECK:        Symbol {
8// CHECK:          Name: kernbase
9// CHECK-NEXT:     Value: 0xFFFFFFFF80000000
10// CHECK-NEXT:     Size: 0
11// CHECK-NEXT:     Binding: Local
12// CHECK-NEXT:     Type: None
13// CHECK-NEXT:     Other: 0
14// CHECK-NEXT:     Section: Absolute (0xFFF1)
15// CHECK-NEXT:   }
16
17// Test that we accept .set of a symbol after it has been used in a statement.
18
19        jmp foo
20        .set foo, bar
21
22// or a .quad
23
24        .quad	foo2
25	.set	foo2,bar2
26
27// Test that there is an undefined reference to bar
28// CHECK:        Symbol {
29// CHECK:          Name: bar
30// CHECK-NEXT:     Value: 0x0
31// CHECK-NEXT:     Size: 0
32// CHECK-NEXT:     Binding: Global
33// CHECK-NEXT:     Type: None
34// CHECK-NEXT:     Other: 0
35// CHECK-NEXT:     Section: Undefined (0x0)
36// CHECK-NEXT:   }
37