51 lines · plain
1// REQUIRES: aarch642// RUN: split-file %s %t.dir && cd %t.dir3 4// RUN: llvm-mc -filetype=obj -triple=aarch64-windows test.s -o test-arm64.obj5// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows test.s -o test-arm64ec.obj6// RUN: llvm-mc -filetype=obj -triple=aarch64-windows drectve.s -o drectve-arm64.obj7// RUN: llvm-mc -filetype=obj -triple=arm64ec-windows drectve.s -o drectve-arm64ec.obj8 9// Check that the -alternatename command-line argument applies only to the EC namespace.10 11// RUN: not lld-link -out:out.dll -machine:arm64x -dll -noentry test-arm64.obj test-arm64ec.obj -alternatename:sym=altsym \12// RUN: 2>&1 | FileCheck --check-prefix=ERR-NATIVE %s13// RUN: not lld-link -out:out.dll -machine:arm64ec -dll -noentry test-arm64.obj test-arm64ec.obj -alternatename:sym=altsym \14// RUN: 2>&1 | FileCheck --check-prefix=ERR-NATIVE %s15 16// ERR-NATIVE-NOT: test-arm64ec.obj17// ERR-NATIVE: lld-link: error: undefined symbol: sym (native symbol)18// ERR-NATIVE-NEXT: >>> referenced by test-arm64.obj:(.test)19// ERR-NATIVE-NOT: test-arm64ec.obj20 21// Check that the -alternatename .drectve directive applies only to the namespace in which it is defined.22 23// RUN: not lld-link -out:out.dll -machine:arm64x -dll -noentry test-arm64.obj test-arm64ec.obj drectve-arm64ec.obj \24// RUN: 2>&1 | FileCheck --check-prefix=ERR-NATIVE %s25// RUN: not lld-link -out:out.dll -machine:arm64ec -dll -noentry test-arm64.obj test-arm64ec.obj drectve-arm64ec.obj \26// RUN: 2>&1 | FileCheck --check-prefix=ERR-NATIVE %s27 28// RUN: not lld-link -out:out.dll -machine:arm64x -dll -noentry test-arm64.obj test-arm64ec.obj drectve-arm64.obj \29// RUN: 2>&1 | FileCheck --check-prefix=ERR-EC %s30// RUN: not lld-link -out:out.dll -machine:arm64ec -dll -noentry test-arm64.obj test-arm64ec.obj drectve-arm64.obj \31// RUN: 2>&1 | FileCheck --check-prefix=ERR-EC %s32 33// ERR-EC-NOT: test-arm64.obj34// ERR-EC: lld-link: error: undefined symbol: sym (EC symbol)35// ERR-EC-NEXT: >>> referenced by test-arm64ec.obj:(.test)36// ERR-EC-NOT: test-arm64.obj37 38// RUN: lld-link -out:out.dll -machine:arm64x -dll -noentry test-arm64.obj test-arm64ec.obj drectve-arm64.obj drectve-arm64ec.obj39 40#--- test.s41 .section .test,"dr"42 .rva sym43 .data44 .globl altsym45altsym:46 .word 047 48#--- drectve.s49 .section .drectve50 .ascii "-alternatename:sym=altsym"51