4 # RUN: split-file %s %t.dir
7 ## Verify that in the following case:
10 ## +- ref.so (weak reference to foo)
11 ## +- wrap.so (non-weak reference to foo)
12 ## +- def.so (defines foo)
14 ## we don't report that foo is undefined in ref.so when linking <exec>.
16 # RUN: llvm-mc -filetype=obj -triple=x86_64 ref.s -o ref.o
17 # RUN: llvm-mc -filetype=obj -triple=x86_64 wrap.s -o wrap.o
18 # RUN: llvm-mc -filetype=obj -triple=x86_64 def.s -o def.o
19 # RUN: ld.lld -shared ref.o -o ref.so
20 # RUN: ld.lld -shared def.o -soname def.so -o def.so
21 # RUN: ld.lld -shared wrap.o def.so -o wrap.so
23 # RUN: llvm-mc -filetype=obj -triple=x86_64 start.s -o start.o
24 # RUN: ld.lld --no-allow-shlib-undefined start.o wrap.so ref.so -o /dev/null 2>&1 | count 0
29 callq wrap_get_foo@PLT
35 movq foo@GOTPCREL
(%rip
), %rax
41 movq foo@GOTPCREL
(%rip
), %rax