aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/tools/llvm-readobj/COFF/x86_64-unwind-preferred-symbol-gcc.yaml
blob: 676da267ad87f350f468ad2c2c5a8b12e5504e96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
## Check that we print the external symbols "func1" and "func2", even though
## the pdata relocations point at the '.text' symbol.

# RUN: yaml2obj %s -o %t.obj
# RUN: llvm-readobj --unwind %t.obj | FileCheck %s

# CHECK: StartAddress: func1
# CHECK: EndAddress: func1 +0x14
# CHECK: UnwindInfoAddress: .xdata

# CHECK: StartAddress: func2
# CHECK: EndAddress: func2 +0x16
# CHECK: UnwindInfoAddress: .xdata +0x8

--- !COFF
header:
  Machine:         IMAGE_FILE_MACHINE_AMD64
  Characteristics: [ IMAGE_FILE_LINE_NUMS_STRIPPED ]
sections:
  - Name:            .text
    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
    Alignment:       16
    SectionData:     4883EC38488D54242CE800000000904883C438C366662E0F1F840000000000904883EC3831C9488D54242CE800000000904883C438C3
    Relocations:
      - VirtualAddress:  10
        SymbolName:      other
        Type:            IMAGE_REL_AMD64_REL32
      - VirtualAddress:  44
        SymbolName:      other
        Type:            IMAGE_REL_AMD64_REL32
  - Name:            .xdata
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
    Alignment:       4
    SectionData:     '01040100046200000104010004620000'
  - Name:            .pdata
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
    Alignment:       4
    SectionData:     '000000001400000000000000200000003600000008000000'
    Relocations:
      - VirtualAddress:  0
        SymbolName:      .text
        Type:            IMAGE_REL_AMD64_ADDR32NB
      - VirtualAddress:  4
        SymbolName:      .text
        Type:            IMAGE_REL_AMD64_ADDR32NB
      - VirtualAddress:  8
        SymbolName:      .xdata
        Type:            IMAGE_REL_AMD64_ADDR32NB
      - VirtualAddress:  12
        SymbolName:      .text
        Type:            IMAGE_REL_AMD64_ADDR32NB
      - VirtualAddress:  16
        SymbolName:      .text
        Type:            IMAGE_REL_AMD64_ADDR32NB
      - VirtualAddress:  20
        SymbolName:      .xdata
        Type:            IMAGE_REL_AMD64_ADDR32NB
symbols:
  - Name:            func1
    Value:           0
    SectionNumber:   1
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
    FunctionDefinition:
      TagIndex:        0
      TotalSize:       0
      PointerToLinenumber: 0
      PointerToNextFunction: 0
  - Name:            func2
    Value:           32
    SectionNumber:   1
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
  - Name:            .text
    Value:           0
    SectionNumber:   1
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_NULL
    StorageClass:    IMAGE_SYM_CLASS_STATIC
    SectionDefinition:
      Length:          54
      NumberOfRelocations: 2
      NumberOfLinenumbers: 0
      CheckSum:        0
      Number:          0
  - Name:            .xdata
    Value:           0
    SectionNumber:   2
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_NULL
    StorageClass:    IMAGE_SYM_CLASS_STATIC
    SectionDefinition:
      Length:          16
      NumberOfRelocations: 0
      NumberOfLinenumbers: 0
      CheckSum:        0
      Number:          0
  - Name:            .pdata
    Value:           0
    SectionNumber:   3
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_NULL
    StorageClass:    IMAGE_SYM_CLASS_STATIC
    SectionDefinition:
      Length:          24
      NumberOfRelocations: 6
      NumberOfLinenumbers: 0
      CheckSum:        0
      Number:          0
  - Name:            other
    Value:           0
    SectionNumber:   0
    SimpleType:      IMAGE_SYM_TYPE_NULL
    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
...