Reported by Stefan Pintilie in D119773. For a branch to a hidden undefined weak symbol, there is an `assert(sym->getVA());` failure in PPC64LongBranchTargetSection::writeTo for a -no-pie link. The root cause is that we unnecessarily create the thunk for the -no-pie link. Fix this by changing the condition to just `s.isUndefined()`. See the inline comment. Rename ppc64-weak-undef-call.s to ppc64-undefined-weak.s to be consistent with other architectures. Reviewed By: sfertile, stefanp Differential Revision: https://reviews.llvm.org/D119787
12 lines
232 B
ArmAsm
12 lines
232 B
ArmAsm
# REQUIRES: ppc
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=powerpc64le %s -o %t.o
|
|
# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR
|
|
|
|
# ERR: error: undefined symbol: undef
|
|
|
|
.global _start
|
|
_start:
|
|
bl undef
|
|
nop
|