]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/COFF/force.test
Vendor import of lld trunk r338150:
[FreeBSD/FreeBSD.git] / test / COFF / force.test
1 # RUN: yaml2obj < %s > %t.obj
2 # RUN: not lld-link /out:%t.exe /entry:main %t.obj >& %t.log
3 # RUN: FileCheck -check-prefix=ERROR %s < %t.log
4 # RUN: lld-link /out:%t.exe /entry:main %t.obj /force >& %t.log
5 # RUN: FileCheck -check-prefix=WARN %s < %t.log
6
7 # ERROR: error: undefined symbol: foo
8 # ERROR-NEXT: >>> referenced by {{.*}}.obj
9 # WARN: warning: undefined symbol: foo
10 # WARN-NEXT: >>> referenced by {{.*}}.obj
11
12 --- !COFF
13 header:
14   Machine:         IMAGE_FILE_MACHINE_AMD64
15   Characteristics: []
16 sections:
17   - Name:            .text
18     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
19     Alignment:       4
20     SectionData:     000000000000
21 symbols:
22   - Name:            .text
23     Value:           0
24     SectionNumber:   1
25     SimpleType:      IMAGE_SYM_TYPE_NULL
26     ComplexType:     IMAGE_SYM_DTYPE_NULL
27     StorageClass:    IMAGE_SYM_CLASS_STATIC
28     SectionDefinition:
29       Length:          6
30       NumberOfRelocations: 0
31       NumberOfLinenumbers: 0
32       CheckSum:        0
33       Number:          0
34   - Name:            main
35     Value:           0
36     SectionNumber:   1
37     SimpleType:      IMAGE_SYM_TYPE_NULL
38     ComplexType:     IMAGE_SYM_DTYPE_NULL
39     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
40   - Name:            foo
41     Value:           0
42     SectionNumber:   0
43     SimpleType:      IMAGE_SYM_TYPE_NULL
44     ComplexType:     IMAGE_SYM_DTYPE_NULL
45     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
46 ...