@@ -4,6 +4,7 @@ RUN: split-file %s %t.dir && cd %t.dir
4
4
RUN: llvm-mc -filetype=obj -triple=arm64ec-windows test.s -o test.obj
5
5
RUN: llvm-mc -filetype=obj -triple=arm64ec-windows icall.s -o icall.obj
6
6
RUN: llvm-mc -filetype=obj -triple=arm64ec-windows hybmp.s -o hybmp.obj
7
+ RUN: llvm-mc -filetype=obj -triple=x86_64-windows test.s -o test-x86_64.obj
7
8
RUN: llvm-mc -filetype=obj -triple=arm64ec-windows %S/Inputs/loadconfig-arm64ec.s -o loadconfig-arm64ec.obj
8
9
RUN: llvm-lib -machine:arm64ec -def:test.def -out:test-arm64ec.lib
9
10
RUN: llvm-lib -machine:arm64ec -def:test2.def -out:test2-arm64ec.lib
@@ -17,8 +18,13 @@ Link using x86_64 import library:
17
18
RUN: lld-link -machine:arm64ec -dll -noentry -out:out2.dll loadconfig-arm64ec.obj icall.obj hybmp.obj \
18
19
RUN: test.obj test-x86_64.lib test2-arm64ec.lib
19
20
21
+ Link using x86_64 object file:
22
+ RUN: lld-link -machine:arm64ec -dll -noentry -out:out3.dll loadconfig-arm64ec.obj icall.obj hybmp.obj \
23
+ RUN: test-x86_64.obj test-arm64ec.lib test2-arm64ec.lib
24
+
20
25
RUN: llvm-readobj --coff-imports out.dll | FileCheck --check-prefix=IMPORTS %s
21
26
RUN: llvm-readobj --coff-imports out2.dll | FileCheck --check-prefix=IMPORTS %s
27
+ RUN: llvm-readobj --coff-imports out3.dll | FileCheck -check-prefix=IMPORTS %s
22
28
IMPORTS: Import {
23
29
IMPORTS-NEXT: Name: test.dll
24
30
IMPORTS-NEXT: ImportLookupTableRVA:
@@ -36,6 +42,7 @@ IMPORTS-NEXT: }
36
42
37
43
RUN: llvm-objdump -d out.dll | FileCheck --check-prefix=DISASM %s
38
44
RUN: llvm-objdump -d out2.dll | FileCheck --check-prefix=DISASM %s
45
+ RUN: llvm-objdump -d out3.dll | FileCheck -check-prefix=DISASM %s
39
46
40
47
DISASM: 180001000: 52800000 mov w0, #0x0 // =0
41
48
DISASM-NEXT: 180001004: d65f03c0 ret
@@ -74,20 +81,33 @@ TESTSEC-NEXT: 0x180007010 08300000 00500000 10300000 20300000
74
81
TESTSEC-NEXT: 0x180007020 14100000 28100000 00200000 08100000
75
82
TESTSEC-NEXT: 0x180007030 3c100000
76
83
84
+ RUN: llvm-readobj --hex-dump=.test out3.dll | FileCheck -check-prefix=TESTSEC-X64 %s
85
+ TESTSEC-X64: 0x180007000 08300000 00300000 10300000 20300000
86
+ TESTSEC-X64-NEXT: 0x180007010 08300000 00500000 10300000 20300000
87
+ TESTSEC-X64-NEXT: 0x180007020 14100000 28100000 00200000 08100000
88
+
77
89
RUN: llvm-readobj --headers out.dll | FileCheck -check-prefix=HEADERS %s
90
+ RUN: llvm-readobj --headers out2.dll | FileCheck -check-prefix=HEADERS %s
91
+ RUN: llvm-readobj --headers out3.dll | FileCheck -check-prefix=HEADERS %s
78
92
HEADERS: LoadConfigTableRVA: 0x4010
79
93
HEADERS: IATRVA: 0x3000
80
94
HEADERS: IATSize: 0x1000
81
95
82
96
RUN: llvm-readobj --coff-load-config out.dll | FileCheck -check-prefix=LOADCONFIG %s
97
+ RUN: llvm-readobj --coff-load-config out2.dll | FileCheck -check-prefix=LOADCONFIG %s
98
+ RUN: llvm-readobj --coff-load-config out3.dll | FileCheck -check-prefix=LOADCONFIG %s
83
99
LOADCONFIG: AuxiliaryIAT: 0x5000
84
100
85
101
RUN: llvm-readobj --hex-dump=.rdata out.dll | FileCheck -check-prefix=RDATA %s
102
+ RUN: llvm-readobj --hex-dump=.rdata out2.dll | FileCheck -check-prefix=RDATA %s
103
+ RUN: llvm-readobj --hex-dump=.rdata out3.dll | FileCheck -check-prefix=RDATA %s
86
104
RDATA: 0x180005000 00000000 00000000 14100080 01000000
87
105
RDATA-NEXT: 0x180005010 28100080 01000000 00000000 00000000
88
106
RDATA-NEXT: 0x180005020 48100080 01000000 00000000 00000000
89
107
90
108
RUN: llvm-readobj --coff-basereloc out.dll | FileCheck -check-prefix=BASERELOC %s
109
+ RUN: llvm-readobj --coff-basereloc out2.dll | FileCheck -check-prefix=BASERELOC %s
110
+ RUN: llvm-readobj --coff-basereloc out3.dll | FileCheck -check-prefix=BASERELOC %s
91
111
BASERELOC: BaseReloc [
92
112
BASERELOC-NOT: Address: 0x5000
93
113
BASERELOC: Address: 0x5008
0 commit comments