[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / interconnected-lazy.s
blob0d67318b3fa0e79e5fa0787bae8cdf066f2441e6
1 # REQUIRES: x86
3 # RUN: split-file %s %t
4 # RUN: llvm-mc -filetype=obj -triple=x86_64 %t/main.s -o %t/main.o
5 # RUN: llvm-mc -filetype=obj -triple=x86_64 %t/a.s -o %t/a.o
6 # RUN: llvm-mc -filetype=obj -triple=x86_64 %t/b.s -o %t/b.o
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 %s
12 # CHECK: a.o: lazy definition of a
13 # CHECK-NEXT: a.o: lazy definition of foo
14 # CHECK-NEXT: a.o: lazy definition of __foo
15 # CHECK-NEXT: b.o: definition of foo
16 # CHECK-NEXT: b.o: definition of __foo
17 # CHECK-NEXT: b.o: reference to a
18 # CHECK-NEXT: a.o: definition of a
20 #--- main.s
21 .globl _start
22 _start:
23 call b
25 #--- a.s
26 .globl a
27 .weak foo
29 foo:
31 .weak __foo
32 __foo:
34 #--- b.s
35 .globl b
36 .weak foo
38 call a
39 foo:
41 .weak __foo
42 __foo: