1# REQUIRES: x86
2# RUN: yaml2obj < %s > %t1.obj
3# RUN: yaml2obj < %s > %t2.obj
4# RUN: not lld-link /out:%t.exe %t1.obj %t2.obj 2>&1 | FileCheck --check-prefix=OBJ %s
5
6# RUN: llvm-as -o %t.lto1.obj %S/Inputs/conflict.ll
7# RUN: llvm-as -o %t.lto2.obj %S/Inputs/conflict.ll
8# RUN: not lld-link /out:%t.exe %t.lto1.obj %t.lto2.obj 2>&1 | FileCheck --check-prefix=BC %s
9
10# OBJ: duplicate symbol: foo
11# OBJ: defined at {{.+}}1.obj
12# OBJ: defined at {{.+}}2.obj
13
14# BC: duplicate symbol: foo
15# BC: defined at {{.+}}conflict.ll
16# BC:            {{.+}}1.obj
17# BC: defined at {{.+}}conflict.ll
18# BC:            {{.+}}2.obj
19
20--- !COFF
21header:
22  Machine:         IMAGE_FILE_MACHINE_AMD64
23  Characteristics: []
24sections:
25  - Name:            .text
26    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
27    Alignment:       16
28    SectionData:     000000000000
29symbols:
30  - Name:            .text
31    Value:           0
32    SectionNumber:   1
33    SimpleType:      IMAGE_SYM_TYPE_NULL
34    ComplexType:     IMAGE_SYM_DTYPE_NULL
35    StorageClass:    IMAGE_SYM_CLASS_STATIC
36    SectionDefinition:
37      Length:          6
38      NumberOfRelocations: 0
39      NumberOfLinenumbers: 0
40      CheckSum:        0
41      Number:          0
42  - Name:            foo
43    Value:           0
44    SectionNumber:   1
45    SimpleType:      IMAGE_SYM_TYPE_NULL
46    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
47    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
48...
49