3 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
4 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/allow-multiple-definition.s -o %t2
5 # RUN: not ld.lld %t1 %t2 -o /dev/null
6 # RUN: not ld.lld --allow-multiple-definition --no-allow-multiple-definition %t1 %t2 -o /dev/null
7 # RUN: ld.lld --allow-multiple-definition --fatal-warnings %t1 %t2 -o %t3
8 # RUN: ld.lld --allow-multiple-definition --fatal-warnings %t2 %t1 -o %t4
9 # RUN: llvm-objdump --no-print-imm-hex -d %t3 | FileCheck %s
10 # RUN: llvm-objdump --no-print-imm-hex -d %t4 | FileCheck --check-prefix=REVERT %s
12 # RUN: ld.lld -z muldefs --fatal-warnings %t1 %t2 -o %t3
13 # RUN: ld.lld -z muldefs --fatal-warnings %t2 %t1 -o %t4
14 # RUN: llvm-objdump --no-print-imm-hex -d %t3 | FileCheck %s
15 # RUN: llvm-objdump --no-print-imm-hex -d %t4 | FileCheck --check-prefix=REVERT %s
17 # inputs contain different constants for instruction movl.
18 # Tests below checks that order of files in command line
19 # affects on what symbol will be used.
20 # If flag allow-multiple-definition is enabled the first
21 # meet symbol should be used.
24 # CHECK-NEXT: movl $1, %eax
27 # REVERT-NEXT: movl $2, %eax