2 RUN: split-file %s %t.dir && cd %t.dir
4 RUN: llvm-mc -filetype=obj -triple=arm64ec-windows funcs.s -o funcs.obj
5 RUN: llvm-mc -filetype=obj -triple=arm64ec-windows func-mangled.s -o func-mangled.obj
6 RUN: llvm-mc -filetype=obj -triple=arm64ec-windows impsym.s -o impsym.obj
7 RUN: llvm-mc -filetype=obj -triple=arm64ec-windows impauxsym.s -o impauxsym.obj
9 Ensure that when both mangled and demangled symbols are present, the __imp_ symbol
10 resolves to the demangled symbol.
12 RUN: lld-link -machine:arm64ec -dll -noentry funcs.obj impsym.obj -out:impsym.dll
14 RUN: llvm-readobj --coff-basereloc impsym.dll | FileCheck --check-prefix=RELOCS %s
16 RELOCS-NEXT: Type: DIR64
17 RELOCS-NEXT: Address: 0x2000
20 RUN: llvm-readobj --hex-dump=.test impsym.dll | FileCheck --check-prefix=TEST %s
21 TEST: 0x180004000 00200000
23 RUN: llvm-readobj --hex-dump=.rdata impsym.dll | FileCheck --check-prefix=RDATA-DEMANGLED %s
24 RDATA-MANGLED: 0x180002000 00100080 01000000
25 RDATA-DEMANGLED: 0x180002000 04100080 01000000
28 Ensure that when both mangled and demangled symbols are present, the __imp_aux_ symbol
29 resolves to the demangled symbol.
31 RUN: lld-link -machine:arm64ec -dll -noentry funcs.obj impauxsym.obj -out:impauxsym.dll
32 RUN: llvm-readobj --hex-dump=.test impauxsym.dll | FileCheck --check-prefix=TEST %s
33 RUN: llvm-readobj --hex-dump=.rdata impauxsym.dll | FileCheck --check-prefix=RDATA-DEMANGLED %s
35 Ensure that if only the mangled symbol is present, the __imp_ symbol resolves to it.
37 RUN: lld-link -machine:arm64ec -dll -noentry func-mangled.obj impsym.obj -out:impsym-mangled.dll
38 RUN: llvm-readobj --coff-basereloc impsym-mangled.dll | FileCheck --check-prefix=RELOCS %s
39 RUN: llvm-readobj --hex-dump=.test impsym-mangled.dll | FileCheck --check-prefix=TEST %s
40 RUN: llvm-readobj --hex-dump=.rdata impsym-mangled.dll | FileCheck --check-prefix=RDATA-MANGLED %s
42 Ensure that if only the mangled symbol is present, the __imp_aux_ symbol resolves to it.
44 RUN: lld-link -machine:arm64ec -dll -noentry func-mangled.obj impauxsym.obj -out:impauxsym-mangled.dll
45 RUN: llvm-readobj --hex-dump=.test impauxsym-mangled.dll | FileCheck --check-prefix=TEST %s
46 RUN: llvm-readobj --hex-dump=.rdata impauxsym-mangled.dll | FileCheck --check-prefix=RDATA-MANGLED %s