42 lines · plain
1REQUIRES: x862RUN: split-file %s %t.dir && cd %t.dir3 4RUN: llvm-mc -filetype=obj -triple=x86_64-windows test.s -o test.obj5RUN: llvm-mc -filetype=obj -triple=x86_64-windows sym2.s -o sym2.obj6RUN: llvm-mc -filetype=obj -triple=x86_64-windows def.s -o def.obj7 8RUN: not lld-link -machine:amd64 -dll -noentry -out:test.dll test.obj sym2.obj 2>&1 | FileCheck -check-prefix=ERR %s9 10ERR: error: undefined symbol: testsym11ERR-NEXT: >>> referenced by test.obj12ERR-EMPTY:13ERR-NEXT: error: undefined symbol: sym114ERR-NEXT: >>> referenced by test.obj15ERR-NEXT: >>> referenced by sym2.obj16ERR-EMPTY:17ERR-NEXT: error: undefined symbol: sym218ERR-NEXT: >>> referenced by test.obj19ERR-NEXT: >>> referenced by sym2.obj20 21Depending on symbol processing order, we may have temporary weak reference cycles:22 23RUN: lld-link -machine:amd64 -dll -noentry -out:test.dll test.obj sym2.obj def.obj24RUN: lld-link -machine:amd64 -dll -noentry -out:test.dll test.obj def.obj sym2.obj25RUN: lld-link -machine:amd64 -dll -noentry -out:test.dll def.obj test.obj sym2.obj26 27#--- test.s28 .weak testsym29.set testsym, sym130 .weak sym131.set sym1, sym232 33#--- sym2.s34 .weak sym235.set sym2, sym136 37#--- def.s38 .globl sym139 .data40sym1:41 .word 042