1// RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s -o %t.o
2// RUN: llvm-readobj -t %t.o | FileCheck %s
3
4// test that we create an external symbol for a to point to.
5
6        .data
7        .long 123
8b:
9        .long   42
10        .weak   a
11a=b
12
13// CHECK:      Symbol {
14// CHECK:        Name: b
15// CHECK-NEXT:   Value: 4
16// CHECK-NEXT:   Section: .data (2)
17// CHECK-NEXT:   BaseType: Null (0x0)
18// CHECK-NEXT:   ComplexType: Null (0x0)
19// CHECK-NEXT:   StorageClass: Static (0x3)
20// CHECK-NEXT:   AuxSymbolCount: 0
21// CHECK-NEXT: }
22// CHECK-NEXT: Symbol {
23// CHECK-NEXT:   Name: a
24// CHECK-NEXT:   Value: 0
25// CHECK-NEXT:   Section: IMAGE_SYM_UNDEFINED (0)
26// CHECK-NEXT:   BaseType: Null (0x0)
27// CHECK-NEXT:   ComplexType: Null (0x0)
28// CHECK-NEXT:   StorageClass: WeakExternal (0x69)
29// CHECK-NEXT:   AuxSymbolCount: 1
30// CHECK-NEXT:   AuxWeakExternal {
31// CHECK-NEXT:     Linked: .weak.a.default (9)
32// CHECK-NEXT:     Search: Library (0x2)
33// CHECK-NEXT:   }
34// CHECK-NEXT: }
35// CHECK-NEXT: Symbol {
36// CHECK-NEXT:   Name: .weak.a.default
37// CHECK-NEXT:   Value: 4
38// CHECK-NEXT:   Section: .data (2)
39// CHECK-NEXT:   BaseType: Null (0x0)
40// CHECK-NEXT:   ComplexType: Null (0x0)
41// CHECK-NEXT:   StorageClass: External (0x2)
42// CHECK-NEXT:   AuxSymbolCount: 0
43// CHECK-NEXT: }
44