xref: /llvm-project/lld/test/ELF/abs-conflict.s (revision 81cebfd0080e3873d0cef5ee5215b8c97332ff96)
1// REQUIRES: x86
2// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3// RUN: ld.lld %t.o %t.o -o %t.so -shared
4// RUN: llvm-readobj --dyn-symbols %t.so | FileCheck %s
5
6// CHECK:      Name: foo
7// CHECK-NEXT: Value: 0x123
8
9.global foo
10foo = 0x123
11
12// RUN: echo ".global foo; foo = 0x124" >  %t2.s
13// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %t2.s -o %t2.o
14// RUN: not ld.lld %t.o %t2.o -o /dev/null -shared 2>&1 | FileCheck --check-prefix=DUP %s
15
16// DUP:      duplicate symbol: foo
17// DUP-NEXT: >>> defined in {{.*}}.o
18// DUP-NEXT: >>> defined in {{.*}}2.o
19