1# Check that we print the external symbol "func", even though the pdata
2# relocation points at the '$LN4' symbol.
3
4# RUN: yaml2obj %s -o %t.obj
5# RUN: llvm-readobj --unwind %t.obj | FileCheck %s
6
7# CHECK: Function: func (0x0)
8
9--- !COFF
10header:
11  Machine:         IMAGE_FILE_MACHINE_ARM64
12  Characteristics: [  ]
13sections:
14  - Name:            '.text$mn'
15    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
16    Alignment:       8
17    SectionData:     FE0F1FF8FF0301D1E003009100000094FF030191FE0741F8C0035FD6
18    Relocations:
19      - VirtualAddress:  12
20        SymbolName:      other
21        Type:            IMAGE_REL_ARM64_BRANCH26
22  - Name:            .pdata
23    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_READ ]
24    Alignment:       4
25    SectionData:     000000001D00A002
26    Relocations:
27      - VirtualAddress:  0
28        SymbolName:      '$LN4'
29        Type:            IMAGE_REL_ARM64_ADDR32NB
30symbols:
31  - Name:            '.text$mn'
32    Value:           0
33    SectionNumber:   1
34    SimpleType:      IMAGE_SYM_TYPE_NULL
35    ComplexType:     IMAGE_SYM_DTYPE_NULL
36    StorageClass:    IMAGE_SYM_CLASS_STATIC
37    SectionDefinition:
38      Length:          28
39      NumberOfRelocations: 1
40      NumberOfLinenumbers: 0
41      CheckSum:        1015150991
42      Number:          0
43      Selection:       IMAGE_COMDAT_SELECT_NODUPLICATES
44  - Name:            other
45    Value:           0
46    SectionNumber:   0
47    SimpleType:      IMAGE_SYM_TYPE_NULL
48    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
49    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
50  - Name:            func
51    Value:           0
52    SectionNumber:   1
53    SimpleType:      IMAGE_SYM_TYPE_NULL
54    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
55    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
56  - Name:            '$LN4'
57    Value:           0
58    SectionNumber:   1
59    SimpleType:      IMAGE_SYM_TYPE_NULL
60    ComplexType:     IMAGE_SYM_DTYPE_NULL
61    StorageClass:    IMAGE_SYM_CLASS_LABEL
62  - Name:            .pdata
63    Value:           0
64    SectionNumber:   2
65    SimpleType:      IMAGE_SYM_TYPE_NULL
66    ComplexType:     IMAGE_SYM_DTYPE_NULL
67    StorageClass:    IMAGE_SYM_CLASS_STATIC
68    SectionDefinition:
69      Length:          8
70      NumberOfRelocations: 1
71      NumberOfLinenumbers: 0
72      CheckSum:        3799667335
73      Number:          2
74      Selection:       IMAGE_COMDAT_SELECT_ASSOCIATIVE
75  - Name:            '$pdata$func'
76    Value:           0
77    SectionNumber:   2
78    SimpleType:      IMAGE_SYM_TYPE_NULL
79    ComplexType:     IMAGE_SYM_DTYPE_NULL
80    StorageClass:    IMAGE_SYM_CLASS_STATIC
81...
82