Home | History | Annotate | Download | only in COFF
      1 // RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s -o - | llvm-readobj -t -r | FileCheck %s
      2 
      3 local1:
      4 external_aliased_to_local = local1
      5 
      6         .globl  global_aliased_to_external
      7 global_aliased_to_external = external1
      8 
      9         .globl  global_aliased_to_local
     10 local2:
     11 global_aliased_to_local = local2
     12 
     13         .weak   weak_aliased_to_external
     14 weak_aliased_to_external = external2
     15 
     16 // Generate relocs against the above aliases.
     17         .long external_aliased_to_local
     18         .long global_aliased_to_external
     19         .long global_aliased_to_local
     20         .long weak_aliased_to_external
     21 
     22 // CHECK:      Relocations [
     23 // CHECK:        0x0 IMAGE_REL_I386_DIR32 local1
     24 // CHECK:        0x4 IMAGE_REL_I386_DIR32 external1
     25 // CHECK:        0x8 IMAGE_REL_I386_DIR32 local2
     26 // CHECK:        0xC IMAGE_REL_I386_DIR32 external2
     27 // CHECK:      ]
     28 // CHECK:      Symbols [
     29 // CHECK-NEXT:   Symbol {
     30 // CHECK-NEXT:     Name: .text
     31 // CHECK-NEXT:     Value: 0
     32 // CHECK-NEXT:     Section: .text (1)
     33 // CHECK-NEXT:     BaseType: Null (0x0)
     34 // CHECK-NEXT:     ComplexType: Null (0x0)
     35 // CHECK-NEXT:     StorageClass: Static (0x3)
     36 // CHECK-NEXT:     AuxSymbolCount: 1
     37 // CHECK:        }
     38 // CHECK:        Symbol {
     39 // CHECK-NEXT:     Name: local1
     40 // CHECK-NEXT:     Value: 0
     41 // CHECK-NEXT:     Section: .text (1)
     42 // CHECK-NEXT:     BaseType: Null (0x0)
     43 // CHECK-NEXT:     ComplexType: Null (0x0)
     44 // CHECK-NEXT:     StorageClass: Static (0x3)
     45 // CHECK-NEXT:     AuxSymbolCount: 0
     46 // CHECK-NEXT:   }
     47 // CHECK-NEXT:   Symbol {
     48 // CHECK-NEXT:     Name: global_aliased_to_external
     49 // CHECK-NEXT:     Value: 0
     50 // CHECK-NEXT:     Section:  (0)
     51 // CHECK-NEXT:     BaseType: Null (0x0)
     52 // CHECK-NEXT:     ComplexType: Null (0x0)
     53 // CHECK-NEXT:     StorageClass: External (0x2)
     54 // CHECK-NEXT:     AuxSymbolCount: 0
     55 // CHECK-NEXT:   }
     56 // CHECK-NEXT:   Symbol {
     57 // CHECK-NEXT:     Name: external1
     58 // CHECK-NEXT:     Value: 0
     59 // CHECK-NEXT:     Section:  (0)
     60 // CHECK-NEXT:     BaseType: Null (0x0)
     61 // CHECK-NEXT:     ComplexType: Null (0x0)
     62 // CHECK-NEXT:     StorageClass: External (0x2)
     63 // CHECK-NEXT:     AuxSymbolCount: 0
     64 // CHECK-NEXT:   }
     65 // CHECK-NEXT:   Symbol {
     66 // CHECK-NEXT:     Name: global_aliased_to_local
     67 // CHECK-NEXT:     Value: 0
     68 // CHECK-NEXT:     Section: .text (1)
     69 // CHECK-NEXT:     BaseType: Null (0x0)
     70 // CHECK-NEXT:     ComplexType: Null (0x0)
     71 // CHECK-NEXT:     StorageClass: Static (0x3)
     72 // CHECK-NEXT:     AuxSymbolCount: 0
     73 // CHECK-NEXT:   }
     74 // CHECK-NEXT:   Symbol {
     75 // CHECK-NEXT:     Name: local2
     76 // CHECK-NEXT:     Value: 0
     77 // CHECK-NEXT:     Section: .text (1)
     78 // CHECK-NEXT:     BaseType: Null (0x0)
     79 // CHECK-NEXT:     ComplexType: Null (0x0)
     80 // CHECK-NEXT:     StorageClass: Static (0x3)
     81 // CHECK-NEXT:     AuxSymbolCount: 0
     82 // CHECK-NEXT:   }
     83 // CHECK-NEXT:   Symbol {
     84 // CHECK-NEXT:     Name: weak_aliased_to_external
     85 // CHECK-NEXT:     Value: 0
     86 // CHECK-NEXT:     Section:  (0)
     87 // CHECK-NEXT:     BaseType: Null (0x0)
     88 // CHECK-NEXT:     ComplexType: Null (0x0)
     89 // CHECK-NEXT:     StorageClass: WeakExternal (0x69)
     90 // CHECK-NEXT:     AuxSymbolCount: 1
     91 // CHECK-NEXT:     AuxWeakExternal {
     92 // CHECK-NEXT:       Linked: external2 (9)
     93 // CHECK-NEXT:       Search: Library (0x2)
     94 // CHECK-NEXT:       Unused: (00 00 00 00 00 00 00 00 00 00)
     95 // CHECK-NEXT:     }
     96 // CHECK-NEXT:   }
     97 // CHECK-NEXT:   Symbol {
     98 // CHECK-NEXT:     Name: external2
     99 // CHECK-NEXT:     Value: 0
    100 // CHECK-NEXT:     Section:  (0)
    101 // CHECK-NEXT:     BaseType: Null (0x0)
    102 // CHECK-NEXT:     ComplexType: Null (0x0)
    103 // CHECK-NEXT:     StorageClass: External (0x2)
    104 // CHECK-NEXT:     AuxSymbolCount: 0
    105 // CHECK-NEXT:   }
    106 // CHECK-NEXT: ]
    107