2018-05-04 23:09:49 +08:00
|
|
|
// REQUIRES: ppc
|
|
|
|
|
2018-04-23 23:01:24 +08:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %t.o
|
2018-05-04 23:09:49 +08:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %p/Inputs/shared-ppc64.s -o %t2.o
|
|
|
|
// RUN: ld.lld -shared %t2.o -o %t2.so
|
|
|
|
// RUN: not ld.lld %t.o %t2.so -o %t 2>&1 | FileCheck %s
|
|
|
|
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t.o
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %p/Inputs/shared-ppc64.s -o %t2.o
|
2018-04-23 23:01:24 +08:00
|
|
|
// RUN: ld.lld -shared %t2.o -o %t2.so
|
|
|
|
// RUN: not ld.lld %t.o %t2.so -o %t 2>&1 | FileCheck %s
|
|
|
|
|
|
|
|
# Calling external function bar needs a nop
|
2018-04-24 04:34:35 +08:00
|
|
|
// CHECK: call lacks nop, can't restore toc
|
2018-04-23 23:01:24 +08:00
|
|
|
.text
|
|
|
|
.abiversion 2
|
|
|
|
|
|
|
|
.global _start
|
|
|
|
_start:
|
|
|
|
bl foo
|