39 lines · plain
1# REQUIRES: x862 3# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t14# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/allow-multiple-definition.s -o %t25# RUN: not ld.lld %t1 %t2 -o /dev/null6# RUN: not ld.lld --allow-multiple-definition --no-allow-multiple-definition %t1 %t2 -o /dev/null7# RUN: ld.lld --allow-multiple-definition --fatal-warnings %t1 %t2 -o %t38# RUN: ld.lld --allow-multiple-definition --fatal-warnings %t2 %t1 -o %t49# RUN: llvm-objdump --no-print-imm-hex -d %t3 | FileCheck %s10# RUN: llvm-objdump --no-print-imm-hex -d %t4 | FileCheck --check-prefix=REVERT %s11 12# RUN: ld.lld --noinhibit-exec %t2 %t1 -o /dev/null 2>&1 | FileCheck %s --check-prefix=WARN13# WARN: warning: duplicate symbol: _bar14 15# RUN: ld.lld -z muldefs --fatal-warnings %t1 %t2 -o %t316# RUN: ld.lld -z muldefs --fatal-warnings %t2 %t1 -o %t417# RUN: llvm-objdump --no-print-imm-hex -d %t3 | FileCheck %s18# RUN: llvm-objdump --no-print-imm-hex -d %t4 | FileCheck --check-prefix=REVERT %s19 20# inputs contain different constants for instruction movl.21# Tests below checks that order of files in command line22# affects on what symbol will be used.23# If flag allow-multiple-definition is enabled the first24# meet symbol should be used.25 26# CHECK: <_bar>:27# CHECK-NEXT: movl $1, %eax28 29# REVERT: <_bar>:30# REVERT-NEXT: movl $2, %eax31 32.globl _bar33.type _bar, @function34_bar:35 mov $1, %eax36 37.globl _start38_start:39