2 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
3 # RUN: echo '.section .foo,"ae"; .weak foo; foo:' | \
4 # RUN: llvm-mc -filetype=obj -triple=x86_64 - -o %t1.o
5 # RUN: not ld.lld %t.o %t1.o -o /dev/null 2>&1 | FileCheck %s
7 # Because foo defined in %t1.o is weak, it does not override global undefined
9 # CHECK-NOT: discarded section
10 # CHECK: undefined symbol: foo