1# REQUIRES: x86 2# RUN: split-file %s %t 3# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o 4# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/weakfoo.s -o %t/weakfoo.o 5# RUN: not %lld -lSystem %t/test.o %t/weakfoo.o -o %t/test 2>&1 | FileCheck %s 6 7# CHECK: lld: error: duplicate symbol: _weakfoo 8 9#--- weakfoo.s 10.globl _weakfoo 11## The weak attribute is ignored for absolute symbols, so we will have a 12## duplicate symbol error for _weakfoo. 13.weak_definition _weakfoo 14_weakfoo = 0x1234 15 16#--- test.s 17.globl _main, _weakfoo 18.weak_definition _weakfoo 19_weakfoo = 0x5678 20 21.text 22_main: 23 ret 24