2018-05-04 15:09:49 +00:00
|
|
|
# REQUIRES: ppc
|
|
|
|
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=powerpc64le-unknown-linux %s -o %t
|
|
|
|
# RUN: ld.lld %t -o %t2
|
2019-04-23 11:47:28 +00:00
|
|
|
# RUN: llvm-objdump -d --no-show-raw-insn %t2 | FileCheck %s
|
2018-05-04 15:09:49 +00:00
|
|
|
|
2015-10-15 16:12:35 +00:00
|
|
|
# RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t
|
2015-11-18 06:11:01 +00:00
|
|
|
# RUN: ld.lld %t -o %t2
|
2019-04-23 11:47:28 +00:00
|
|
|
# RUN: llvm-objdump -d --no-show-raw-insn %t2 | FileCheck %s
|
2015-10-15 16:12:35 +00:00
|
|
|
|
|
|
|
# CHECK: Disassembly of section .text:
|
2019-05-01 10:40:48 +00:00
|
|
|
# CHECK-EMPTY:
|
2015-10-15 16:12:35 +00:00
|
|
|
|
2018-05-04 15:09:49 +00:00
|
|
|
.text
|
2015-10-15 16:12:35 +00:00
|
|
|
.global _start
|
|
|
|
_start:
|
|
|
|
bl weakfunc
|
|
|
|
nop
|
|
|
|
blr
|
|
|
|
|
|
|
|
.weak weakfunc
|
|
|
|
|
|
|
|
# It does not really matter how we fixup the bl, if at all, because it needs to
|
2015-10-17 00:48:20 +00:00
|
|
|
# be unreachable. But, we should link successfully. We should not, however,
|
|
|
|
# generate a .plt entry (this would be wasted space). For now, we do nothing
|
|
|
|
# (leaving the zero relative offset present in the input).
|
2019-04-23 11:47:28 +00:00
|
|
|
# CHECK: 10010000: bl .+0
|
|
|
|
# CHECK: 10010004: nop
|
|
|
|
# CHECK: 10010008: blr
|