1# REQUIRES: x86 2# RUN: split-file %s %t.dir 3 4# RUN: llvm-dlltool -m i386:x86-64 -d %t.dir/lib.def -D lib.dll -l %t.dir/lib.lib 5 6# RUN: llvm-mc -triple=x86_64-windows-gnu %t.dir/main.s -filetype=obj -o %t.dir/main.obj 7# RUN: llvm-mc -triple=x86_64-windows-gnu %t.dir/func.s -filetype=obj -o %t.dir/func.obj 8# RUN: env LLD_IN_TEST=1 not lld-link -lldmingw -out:%t.dir/main.exe -entry:main %t.dir/main.obj %t.dir/lib.lib 2>&1 | FileCheck %s --check-prefix=ERR 9 10# RUN: lld-link -lldmingw -out:%t.dir/main.exe -entry:main %t.dir/main.obj %t.dir/func.obj %t.dir/lib.lib 2>&1 | FileCheck %s --check-prefix=NOERR --allow-empty 11 12# ERR: error: output image has runtime pseudo relocations, but the function _pei386_runtime_relocator is missing; it is needed for fixing the relocations at runtime 13 14# NOERR-NOT: error 15 16#--- main.s 17 .global main 18 .text 19main: 20 ret 21 22 .data 23 .long 1 24 .quad variable 25 .long 2 26 27#--- func.s 28 .global _pei386_runtime_relocator 29 .text 30_pei386_runtime_relocator: 31 ret 32 33#--- lib.def 34EXPORTS 35variable DATA 36 37