2018-06-06 21:56:51 +08:00
|
|
|
// REQUIRES: x86
|
2017-07-05 22:55:43 +08:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
2018-02-02 19:25:10 +08:00
|
|
|
// RUN: rm -rf %t.dir
|
|
|
|
// RUN: mkdir %t.dir
|
|
|
|
// RUN: cd %t.dir
|
|
|
|
// RUN: echo > file.bin
|
2017-07-05 22:55:43 +08:00
|
|
|
|
2018-02-02 19:25:10 +08:00
|
|
|
// RUN: not ld.lld %t.o --format=binary file.bin -o %t.elf 2>&1 | FileCheck %s
|
|
|
|
// RUN: not ld.lld %t.o --format binary file.bin -o %t.elf 2>&1 | FileCheck %s
|
2017-07-05 22:55:43 +08:00
|
|
|
|
2018-02-02 19:25:10 +08:00
|
|
|
// CHECK: duplicate symbol: _binary_file_bin_start
|
|
|
|
// CHECK-NEXT: defined at {{.*}}.o:(.text+0x0)
|
2018-02-05 17:47:24 +08:00
|
|
|
// CHECK-NEXT: defined at file.bin:(.data+0x0)
|
2018-02-02 19:25:10 +08:00
|
|
|
|
|
|
|
.globl _binary_file_bin_start
|
|
|
|
_binary_file_bin_start:
|
|
|
|
.long 0
|