76 lines · plain
1# REQUIRES: aarch642RUN: split-file %s %t.dir && cd %t.dir3 4RUN: llvm-lib -machine:arm64x -out:libtest.a -defArm64Native:test.def -def:test.def5RUN: llvm-mc -triple=arm64ec-windows-gnu arm64ec.s -filetype=obj -o arm64ec.obj6RUN: llvm-mc -triple=aarch64-windows-gnu aarch64.s -filetype=obj -o aarch64.obj7RUN: llvm-mc -filetype=obj -triple=arm64ec-windows %S/Inputs/loadconfig-arm64ec.s -o loadconfig-arm64ec.obj8RUN: llvm-mc -filetype=obj -triple=aarch64-windows %S/Inputs/loadconfig-arm64.s -o loadconfig-arm64.obj9 10RUN: lld-link -machine:arm64x -out:out.dll -dll -noentry arm64ec.obj aarch64.obj libtest.a loadconfig-arm64.obj loadconfig-arm64ec.obj -lldmingw11 12RUN: llvm-readobj --coff-imports out.dll | FileCheck -check-prefix=IMPORTS %s13RUN: llvm-objdump -s out.dll | FileCheck --check-prefix=CONTENTS %s14 15IMPORTS: Import {16IMPORTS-NEXT: Name: test.dll17IMPORTS-NEXT: ImportLookupTableRVA: 0x5{{.*}}18IMPORTS-NEXT: ImportAddressTableRVA: 0x400019IMPORTS-NEXT: Symbol: variable (0)20IMPORTS-NEXT: }21IMPORTS-NEXT: HybridObject {22IMPORTS: Import {23IMPORTS-NEXT: Name: test.dll24IMPORTS-NEXT: ImportLookupTableRVA: 0x5{{.*}}25IMPORTS-NEXT: ImportAddressTableRVA: 0x400026IMPORTS-NEXT: Symbol: variable (0)27IMPORTS-NEXT: }28IMPORTS-NEXT: }29 30Native ARM64 runtime pseudo relocation list header at 0x5164, consisting of 0x0, 0x0, 0x1.31The runtime pseudo relocation is from an aarch64.obj object file, with import from 0x4000,32applied at 0x9018 with a size of 64 bits. ARM64EC runtime pseudo relocation list header at330x517c, consisting of 0x0, 0x0, 0x1. The runtime pseudo relocation is from arm64ec.obj34object file, with import from 0x4000, applied at 0x9000 with a size of 64 bits.35 36CONTENTS: Contents of section .rdata:37CONTENTS: 180005160 00300000 00000000 00000000 0100000038CONTENTS: 180005170 00400000 18900000 40000000 0000000039CONTENTS: 180005180 00000000 01000000 00400000 0090000040CONTENTS: 180005190 4000000041 42CONTENTS: Contents of section .test:43CONTENTS-NEXT: 180009000 00400080 01000000 7c510080 0100000044CONTENTS-NEXT: 180009010 94510080 01000000 00400080 0100000045CONTENTS-NEXT: 180009020 64510080 01000000 7c510080 0100000046 47#--- arm64ec.s48 .text49 .global "#_pei386_runtime_relocator"50"#_pei386_runtime_relocator":51 ret52 53 .weak_anti_dep _pei386_runtime_relocator54.set _pei386_runtime_relocator,"#_pei386_runtime_relocator"55 56 .section .test,"dr"57 .quad variable58 .quad __RUNTIME_PSEUDO_RELOC_LIST__59 .quad __RUNTIME_PSEUDO_RELOC_LIST_END__60 61#--- aarch64.s62 .text63 .global _pei386_runtime_relocator64_pei386_runtime_relocator:65 ret66 67 .section .test,"dr"68 .quad variable69 .quad __RUNTIME_PSEUDO_RELOC_LIST__70 .quad __RUNTIME_PSEUDO_RELOC_LIST_END__71 72#--- test.def73LIBRARY test.dll74EXPORTS75 variable DATA76