43 lines · plain
1# REQUIRES: x862 3# RUN: split-file %s %t4# RUN: llvm-mc -filetype=obj -triple=x86_64 %t/main.s -o %t/main.o5# RUN: llvm-mc -filetype=obj -triple=x86_64 %t/a.s -o %t/a.o6# RUN: llvm-mc -filetype=obj -triple=x86_64 %t/b.s -o %t/b.o7 8## foo and __foo are interconnected and defined in two lazy object files.9## Test we resolve both to the same file.10# RUN: ld.lld -y a -y foo -y __foo %t/main.o --start-lib %t/a.o %t/b.o --end-lib -o /dev/null | FileCheck %s11 12# CHECK: a.o: lazy definition of a13# CHECK-NEXT: a.o: lazy definition of foo14# CHECK-NEXT: a.o: lazy definition of __foo15# CHECK-NEXT: b.o: definition of foo16# CHECK-NEXT: b.o: definition of __foo17# CHECK-NEXT: b.o: reference to a18# CHECK-NEXT: a.o: definition of a19 20#--- main.s21.globl _start22_start:23 call b24 25#--- a.s26.globl a27.weak foo28a:29foo:30 31.weak __foo32__foo:33 34#--- b.s35.globl b36.weak foo37b:38 call a39foo:40 41.weak __foo42__foo:43