brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 691aa8f Raw
55 lines · plain
1REQUIRES: x862RUN: split-file %s %t.dir && cd %t.dir3 4RUN: llvm-mc -filetype=obj -triple=x86_64-windows antidep.s -o antidep.obj5RUN: llvm-mc -filetype=obj -triple=x86_64-windows antidep2.s -o antidep2.obj6RUN: llvm-mc -filetype=obj -triple=x86_64-windows weak.s -o weak.obj7RUN: llvm-mc -filetype=obj -triple=x86_64-windows test.s -o test.obj8 9Check that a regular weak alias overrides an anti-dependency symbol.10 11RUN: lld-link -dll -noentry -out:out1.dll antidep.obj weak.obj test.obj12RUN: llvm-readobj --hex-dump=.test out1.dll | FileCheck --check-prefix=CHECK2 %s13 14RUN: lld-link -dll -noentry -out:out2.dll weak.obj antidep.obj test.obj15RUN: llvm-readobj --hex-dump=.test out2.dll | FileCheck --check-prefix=CHECK2 %s16 17RUN: lld-link -dll -noentry -out:out3.dll antidep.obj weak.obj test.obj -lld-allow-duplicate-weak18RUN: llvm-readobj --hex-dump=.test out3.dll | FileCheck --check-prefix=CHECK2 %s19 20RUN: lld-link -dll -noentry -out:out4.dll weak.obj antidep.obj test.obj -lld-allow-duplicate-weak21RUN: llvm-readobj --hex-dump=.test out4.dll | FileCheck --check-prefix=CHECK2 %s22 23When an anti-dependency symbol is duplicated, the first definition takes precedence over subsequent ones.24 25RUN: lld-link -dll -noentry -out:out5.dll antidep.obj antidep2.obj test.obj26RUN: llvm-readobj --hex-dump=.test out5.dll | FileCheck --check-prefix=CHECK1 %s27 28RUN: lld-link -dll -noentry -out:out6.dll antidep2.obj antidep.obj test.obj29RUN: llvm-readobj --hex-dump=.test out6.dll | FileCheck --check-prefix=CHECK2 %s30 31CHECK1: 0100000032CHECK2: 0200000033 34#--- antidep.s35     .weak_anti_dep sym36.set sym,target137 38#--- antidep2.s39     .weak_anti_dep sym40.set sym,target241 42#--- weak.s43     .weak sym44.set sym,target245 46#--- test.s47     .section .target,"dr"48     .globl target149.set target1,150     .globl target251.set target2,252 53     .section .test,"dr"54     .long sym55