1 # RUN: yaml2obj %s -o %t.obj
2 # RUN: lld-link /out:%t.exe /entry:main /subsystem:console /force \
3 # RUN: /merge:.foo=.abc /merge:.bar=.def %t.obj /debug
4 # RUN: llvm-readobj --sections %t.exe | FileCheck %s
6 # RUN: lld-link /out:%t.exe /entry:main /subsystem:console /force \
7 # RUN: /merge:.foo=.bar /merge:.bar=.abc %t.obj /debug
8 # RUN: llvm-readobj --sections %t.exe | FileCheck --check-prefix=CHECK2 %s
10 # RUN: env LLD_IN_TEST=1 not lld-link /out:%t.exe /entry:main /subsystem:console /force \
11 # RUN: /merge:.rsrc=.foo %t.obj /debug 2>&1 | FileCheck --check-prefix=NO-RSRC %s
12 # RUN: env LLD_IN_TEST=1 not lld-link /out:%t.exe /entry:main /subsystem:console /force \
13 # RUN: /merge:.foo=.rsrc %t.obj /debug 2>&1 | FileCheck --check-prefix=NO-RSRC %s
14 # RUN: env LLD_IN_TEST=1 not lld-link /out:%t.exe /entry:main /subsystem:console /force \
15 # RUN: /merge:.reloc=.foo %t.obj /debug 2>&1 | FileCheck --check-prefix=NO-RELOC %s
16 # RUN: env LLD_IN_TEST=1 not lld-link /out:%t.exe /entry:main /subsystem:console /force \
17 # RUN: /merge:.foo=.reloc %t.obj /debug 2>&1 | FileCheck --check-prefix=NO-RELOC %s
18 # RUN: env LLD_IN_TEST=1 not lld-link /out:%t.exe /entry:main /subsystem:console /force \
19 # RUN: /merge:.foo=.foo1 /merge:.foo1=.foo %t.obj /debug 2>&1 | FileCheck --check-prefix=NO-CYCLE %s
20 # RUN: env LLD_IN_TEST=1 not lld-link /out:%t.exe /entry:main /subsystem:console /force \
21 # RUN: /merge:.foo=.foo1 /merge:.foo1=.foo2 /merge:.foo2=.foo1 %t.obj /debug 2>&1 | FileCheck --check-prefix=NO-CYCLE %s
26 # CHECK2-NOT: Name: .bar
28 # CHECK2-NOT: Name: .bar
30 # NO-RSRC: /merge: cannot merge '.rsrc' with any section
31 # NO-RELOC: /merge: cannot merge '.reloc' with any section
33 # NO-CYCLE: /merge: cycle found for section '.foo'
37 Machine: IMAGE_FILE_MACHINE_AMD64
41 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
43 SectionData: 000000000000
45 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
47 SectionData: 000000000000
52 SimpleType: IMAGE_SYM_TYPE_NULL
53 ComplexType: IMAGE_SYM_DTYPE_NULL
54 StorageClass: IMAGE_SYM_CLASS_STATIC
57 NumberOfRelocations: 0
58 NumberOfLinenumbers: 0
64 SimpleType: IMAGE_SYM_TYPE_NULL
65 ComplexType: IMAGE_SYM_DTYPE_NULL
66 StorageClass: IMAGE_SYM_CLASS_STATIC
69 NumberOfRelocations: 0
70 NumberOfLinenumbers: 0
76 SimpleType: IMAGE_SYM_TYPE_NULL
77 ComplexType: IMAGE_SYM_DTYPE_FUNCTION
78 StorageClass: IMAGE_SYM_CLASS_EXTERNAL