• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# REQUIRES: x86
2# RUN: yaml2obj %s -o %t.obj
3# RUN: lld-link /out:%t.exe /entry:main %t.obj %t.obj
4# RUN: llvm-objdump -d %t.exe | FileCheck %s
5
6# Operands of B8 (MOV EAX) are common symbols
7# CHECK: 1000: b8 00 20 00 40
8# CHECK: 1005: b8 04 20 00 40
9# CHECK: 100a: b8 20 20 00 40
10# CHECK: 100f: b8 60 20 00 40
11# CHECK: 1014: b8 70 20 00 40
12
13--- !COFF
14header:
15  Machine:         IMAGE_FILE_MACHINE_AMD64
16  Characteristics: []
17sections:
18  - Name:            .text
19    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
20    Alignment:       4
21    SectionData:     b800000000b800000000b800000000b800000000b800000000
22    Relocations:
23      - VirtualAddress:  1
24        SymbolName:      bssdata4
25        Type:            IMAGE_REL_AMD64_ADDR32
26      - VirtualAddress:  6
27        SymbolName:      bsspad1
28        Type:            IMAGE_REL_AMD64_ADDR32
29      - VirtualAddress:  11
30        SymbolName:      bssdata64
31        Type:            IMAGE_REL_AMD64_ADDR32
32      - VirtualAddress:  16
33        SymbolName:      bsspad2
34        Type:            IMAGE_REL_AMD64_ADDR32
35      - VirtualAddress:  21
36        SymbolName:      bssdata16
37        Type:            IMAGE_REL_AMD64_ADDR32
38symbols:
39  - Name:            .text
40    Value:           0
41    SectionNumber:   1
42    SimpleType:      IMAGE_SYM_TYPE_NULL
43    ComplexType:     IMAGE_SYM_DTYPE_NULL
44    StorageClass:    IMAGE_SYM_CLASS_STATIC
45    SectionDefinition:
46      Length:          0
47      NumberOfRelocations: 5
48      NumberOfLinenumbers: 0
49      CheckSum:        0
50      Number:          0
51  - Name:            main
52    Value:           0
53    SectionNumber:   1
54    SimpleType:      IMAGE_SYM_TYPE_NULL
55    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
56    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
57  - Name:            bssdata4
58    Value:           4
59    SectionNumber:   0
60    SimpleType:      IMAGE_SYM_TYPE_NULL
61    ComplexType:     IMAGE_SYM_DTYPE_NULL
62    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
63  - Name:            bsspad1
64    Value:           1
65    SectionNumber:   0
66    SimpleType:      IMAGE_SYM_TYPE_NULL
67    ComplexType:     IMAGE_SYM_DTYPE_NULL
68    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
69  - Name:            bssdata64
70    Value:           64
71    SectionNumber:   0
72    SimpleType:      IMAGE_SYM_TYPE_NULL
73    ComplexType:     IMAGE_SYM_DTYPE_NULL
74    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
75  - Name:            bsspad2
76    Value:           1
77    SectionNumber:   0
78    SimpleType:      IMAGE_SYM_TYPE_NULL
79    ComplexType:     IMAGE_SYM_DTYPE_NULL
80    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
81  - Name:            bssdata16
82    Value:           15
83    SectionNumber:   0
84    SimpleType:      IMAGE_SYM_TYPE_NULL
85    ComplexType:     IMAGE_SYM_DTYPE_NULL
86    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
87...
88