69 lines · plain
1REQUIRES: aarch642RUN: split-file %s %t.dir && cd %t.dir3 4RUN: llvm-mc -filetype=obj -triple=arm64ec-windows funcs.s -o funcs.obj5RUN: llvm-mc -filetype=obj -triple=arm64ec-windows func-mangled.s -o func-mangled.obj6RUN: llvm-mc -filetype=obj -triple=arm64ec-windows impsym.s -o impsym.obj7RUN: llvm-mc -filetype=obj -triple=arm64ec-windows impauxsym.s -o impauxsym.obj8 9Ensure that when both mangled and demangled symbols are present, the __imp_ symbol10resolves to the demangled symbol.11 12RUN: lld-link -machine:arm64ec -dll -noentry funcs.obj impsym.obj -out:impsym.dll13 14RUN: llvm-readobj --coff-basereloc impsym.dll | FileCheck --check-prefix=RELOCS %s15RELOCS: Entry {16RELOCS-NEXT: Type: DIR6417RELOCS-NEXT: Address: 0x200018RELOCS-NEXT: }19 20RUN: llvm-readobj --hex-dump=.test impsym.dll | FileCheck --check-prefix=TEST %s21TEST: 0x180004000 0020000022 23RUN: llvm-readobj --hex-dump=.rdata impsym.dll | FileCheck --check-prefix=RDATA-DEMANGLED %s24RDATA-MANGLED: 0x180002000 00100080 0100000025RDATA-DEMANGLED: 0x180002000 04100080 0100000026 27 28Ensure that when both mangled and demangled symbols are present, the __imp_aux_ symbol29resolves to the demangled symbol.30 31RUN: lld-link -machine:arm64ec -dll -noentry funcs.obj impauxsym.obj -out:impauxsym.dll32RUN: llvm-readobj --hex-dump=.test impauxsym.dll | FileCheck --check-prefix=TEST %s33RUN: llvm-readobj --hex-dump=.rdata impauxsym.dll | FileCheck --check-prefix=RDATA-DEMANGLED %s34 35Ensure that if only the mangled symbol is present, the __imp_ symbol resolves to it.36 37RUN: lld-link -machine:arm64ec -dll -noentry func-mangled.obj impsym.obj -out:impsym-mangled.dll38RUN: llvm-readobj --coff-basereloc impsym-mangled.dll | FileCheck --check-prefix=RELOCS %s39RUN: llvm-readobj --hex-dump=.test impsym-mangled.dll | FileCheck --check-prefix=TEST %s40RUN: llvm-readobj --hex-dump=.rdata impsym-mangled.dll | FileCheck --check-prefix=RDATA-MANGLED %s41 42Ensure that if only the mangled symbol is present, the __imp_aux_ symbol resolves to it.43 44RUN: lld-link -machine:arm64ec -dll -noentry func-mangled.obj impauxsym.obj -out:impauxsym-mangled.dll45RUN: llvm-readobj --hex-dump=.test impauxsym-mangled.dll | FileCheck --check-prefix=TEST %s46RUN: llvm-readobj --hex-dump=.rdata impauxsym-mangled.dll | FileCheck --check-prefix=RDATA-MANGLED %s47 48#--- funcs.s49 .globl "#myfunc"50"#myfunc":51 ret52 .text53 .globl myfunc54myfunc:55 ret56 57#--- func-mangled.s58 .globl "#myfunc"59"#myfunc":60 ret61 62#--- impsym.s63 .section .test, "r"64 .rva __imp_myfunc65 66#--- impauxsym.s67 .section .test, "r"68 .rva __imp_aux_myfunc69