Files
clang-p2996/lld/test/ELF/allow-multiple-definition.s
Ed Maste 8fd0196c6f lld: Default image base address to 0x200000 on x86-64
Align to the large page size (known as a superpage or huge page).
FreeBSD automatically promotes large, superpage-aligned allocations.

Differential Revision:	https://reviews.llvm.org/D27042

llvm-svn: 287782
2016-11-23 17:44:02 +00:00

30 lines
909 B
ArmAsm

# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/allow-multiple-definition.s -o %t2
# RUN: not ld.lld %t1 %t2 -o %t3
# RUN: ld.lld --allow-multiple-definition %t1 %t2 -o %t3
# RUN: ld.lld --allow-multiple-definition %t2 %t1 -o %t4
# RUN: llvm-objdump -d %t3 | FileCheck %s
# RUN: llvm-objdump -d %t4 | FileCheck -check-prefix=REVERT %s
# inputs contain different constants for instuction movl.
# Tests below checks that order of files in command line
# affects on what symbol will be used.
# If flag allow-multiple-definition is enabled the first
# meet symbol should be used.
# CHECK: _bar:
# CHECK-NEXT: 201000: b8 01 00 00 00 movl $1, %eax
# REVERT: _bar:
# REVERT-NEXT: 201000: b8 02 00 00 00 movl $2, %eax
.globl _bar
.type _bar, @function
_bar:
mov $1, %eax
.globl _start
_start: