1# REQUIRES: system-windows
2# RUN: yaml2obj < %s > %t1.obj
3# RUN: yaml2obj < %s > %t2.obj
4# RUN: not lld-link /out:%t.exe %t1.obj %t2.obj >& %t.log
5# RUN: FileCheck %s < %t.log
6
7# CHECK: duplicate symbol: "int __cdecl mangled(void)" (?mangled@@YAHXZ) in {{.+}}1.obj and in {{.+}}2.obj
8
9--- !COFF
10header:
11  Machine:         IMAGE_FILE_MACHINE_AMD64
12  Characteristics: []
13sections:
14  - Name:            .text
15    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
16    Alignment:       16
17    SectionData:     000000000000
18symbols:
19  - Name:            .text
20    Value:           0
21    SectionNumber:   1
22    SimpleType:      IMAGE_SYM_TYPE_NULL
23    ComplexType:     IMAGE_SYM_DTYPE_NULL
24    StorageClass:    IMAGE_SYM_CLASS_STATIC
25    SectionDefinition:
26      Length:          6
27      NumberOfRelocations: 0
28      NumberOfLinenumbers: 0
29      CheckSum:        0
30      Number:          0
31  - Name:            '?mangled@@YAHXZ'
32    Value:           0
33    SectionNumber:   1
34    SimpleType:      IMAGE_SYM_TYPE_NULL
35    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
36    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
37...
38