2016-09-07 20:09:10 +08:00
|
|
|
# REQUIRES: x86
|
2016-01-14 02:55:39 +08:00
|
|
|
|
2016-02-03 04:24:33 +08:00
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o
|
|
|
|
# RUN: not ld.lld %t1.o %t1.o -o %t2 2>&1 | FileCheck -check-prefix=DEMANGLE %s
|
2016-01-14 02:55:39 +08:00
|
|
|
|
2017-04-01 07:40:21 +08:00
|
|
|
# DEMANGLE: duplicate symbol: mul(double, double)
|
|
|
|
# DEMANGLE-NEXT: >>> defined at {{.*}}:(.text+0x0)
|
|
|
|
# DEMANGLE-NEXT: >>> defined at {{.*}}:(.text+0x0)
|
|
|
|
# DEMANGLE: duplicate symbol: foo
|
|
|
|
# DEMANGLE-NEXT: >>> defined at {{.*}}:(.text+0x0)
|
|
|
|
# DEMANGLE-NEXT: >>> defined at {{.*}}:(.text+0x0)
|
2016-01-30 03:41:13 +08:00
|
|
|
|
2016-02-03 04:24:33 +08:00
|
|
|
# RUN: not ld.lld %t1.o %t1.o -o %t2 --no-demangle 2>&1 | \
|
2016-02-02 16:22:41 +08:00
|
|
|
# RUN: FileCheck -check-prefix=NO_DEMANGLE %s
|
|
|
|
|
2017-04-01 07:40:21 +08:00
|
|
|
# NO_DEMANGLE: duplicate symbol: _Z3muldd
|
|
|
|
# NO_DEMANGLE-NEXT: >>> defined at {{.*}}:(.text+0x0)
|
|
|
|
# NO_DEMANGLE-NEXT: >>> defined at {{.*}}:(.text+0x0)
|
|
|
|
# NO_DEMANGLE: duplicate symbol: foo
|
|
|
|
# NO_DEMANGLE-NEXT: >>> defined at {{.*}}:(.text+0x0)
|
|
|
|
# NO_DEMANGLE-NEXT: >>> defined at {{.*}}:(.text+0x0)
|
2016-01-14 02:55:39 +08:00
|
|
|
|
2016-08-31 16:53:21 +08:00
|
|
|
# RUN: not ld.lld %t1.o %t1.o -o %t2 --demangle --no-demangle 2>&1 | \
|
|
|
|
# RUN: FileCheck -check-prefix=NO_DEMANGLE %s
|
|
|
|
# RUN: not ld.lld %t1.o %t1.o -o %t2 --no-demangle --demangle 2>&1 | \
|
|
|
|
# RUN: FileCheck -check-prefix=DEMANGLE %s
|
|
|
|
|
2016-02-03 04:24:33 +08:00
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %S/Inputs/conflict.s -o %t2.o
|
2018-08-02 19:33:54 +08:00
|
|
|
# RUN: rm -f %t3.a
|
2016-02-03 04:24:33 +08:00
|
|
|
# RUN: llvm-ar rcs %t3.a %t2.o
|
|
|
|
# RUN: not ld.lld %t1.o %t3.a -u baz -o %t2 2>&1 | FileCheck -check-prefix=ARCHIVE %s
|
2016-02-02 16:22:41 +08:00
|
|
|
|
2017-04-01 07:40:21 +08:00
|
|
|
# ARCHIVE: duplicate symbol: foo
|
|
|
|
# ARCHIVE-NEXT: >>> defined at {{.*}}:(.text+0x0)
|
|
|
|
# ARCHIVE-NEXT: >>> defined at {{.*}}:(.text+0x0) in archive {{.*}}.a
|
2016-11-09 00:26:32 +08:00
|
|
|
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/conflict-debug.s -o %t-dbg.o
|
2018-07-03 01:48:23 +08:00
|
|
|
# RUN: not ld.lld %t-dbg.o %t-dbg.o -o /dev/null 2>&1 | FileCheck -check-prefix=DBGINFO %s
|
2016-11-09 00:26:32 +08:00
|
|
|
|
2017-04-01 07:40:21 +08:00
|
|
|
# DBGINFO: duplicate symbol: zed
|
|
|
|
# DBGINFO-NEXT: >>> defined at conflict-debug.s:4
|
|
|
|
# DBGINFO-NEXT: >>> {{.*}}:(.text+0x0)
|
|
|
|
# DBGINFO-NEXT: >>> defined at conflict-debug.s:4
|
|
|
|
# DBGINFO-NEXT: >>> {{.*}}:(.text+0x0)
|
2016-02-02 16:22:41 +08:00
|
|
|
|
2016-01-30 03:41:13 +08:00
|
|
|
.globl _Z3muldd, foo
|
2016-01-14 02:55:39 +08:00
|
|
|
_Z3muldd:
|
2016-01-30 03:41:13 +08:00
|
|
|
foo:
|
2016-01-14 02:55:39 +08:00
|
|
|
mov $60, %rax
|
|
|
|
mov $42, %rdi
|
|
|
|
syscall
|