44 lines · plain
1// REQUIRES: x862// RUN: split-file %s %t.dir && cd %t.dir3 4// RUN: llvm-mc -filetype=obj -triple=x86_64-windows refab.s -o refab.obj5// RUN: llvm-mc -filetype=obj -triple=x86_64-windows aa.s -o aa.obj6// RUN: llvm-mc -filetype=obj -triple=x86_64-windows b.s -o b.obj7// RUN: llvm-mc -filetype=obj -triple=x86_64-windows antidep.s -o antidep.obj8// RUN: llvm-lib -out:aa.lib aa.obj9// RUN: llvm-lib -out:b.lib b.obj10 11// Check that -alternatename with an undefined target does not prevent the symbol from being resolved to a library,12// once another alternate name is resolved and pulls in the source symbol.13// RUN: lld-link -out:out.dll -dll -noentry -machine:amd64 refab.obj aa.lib -alternatename:a=aa -alternatename:b=undef14 15// Check that -alternatename with an anti-dependency target does not prevent the symbol from being resolved to a library,16// after another alternate name is resolved and pulls in the source symbol.17// RUN: lld-link -out:out2.dll -dll -noentry -machine:amd64 antidep.obj refab.obj aa.lib -alternatename:a=aa -alternatename:b=u18 19#--- refab.s20 .data21 .rva a22 .rva b23 24#--- aa.s25 .globl aa26aa:27 .word 128 29 .section .drectve, "yn"30 .ascii "/defaultlib:b.lib"31 32#--- b.s33 .globl b34b:35 .word 236 37#--- antidep.s38 .weak_anti_dep u39 .set u,d40 41 .globl d42d:43 .word 344