[all-commits] [llvm/llvm-project] 459e8e: [PowerPC]: Don't allow r0 as a target for LD_GOT_T...
Justin Hibbits via All-commits
all-commits at lists.llvm.org
Thu Mar 26 09:01:10 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 459e8e94886f979d079a9269dbb2ba83e84c4642
https://github.com/llvm/llvm-project/commit/459e8e94886f979d079a9269dbb2ba83e84c4642
Author: Justin Hibbits <jrh29 at alumni.cwru.edu>
Date: 2020-03-26 (Thu, 26 Mar 2020)
Changed paths:
M llvm/lib/Target/PowerPC/PPCInstr64Bit.td
M llvm/lib/Target/PowerPC/PPCInstrInfo.td
M llvm/test/CodeGen/PowerPC/tls.ll
Log Message:
-----------
[PowerPC]: Don't allow r0 as a target for LD_GOT_TPREL_L/32
Summary:
The linker is free to relax this (relocation R_PPC_GOT_TPREL16) against
R_PPC_TLS, if it sees fit (initial exec to local exec). If r0 is used,
this can generate execution-invalid code (converts to 'addi %rX, %r0,
FOO, which translates in PPC-lingo to li %rX, FOO). Forbid this
instead.
This fixes static binaries using locales on FreeBSD/powerpc
(tested on FreeBSD/powerpcspe).
Reviewed By: nemanjai
Differential Revision: https://reviews.llvm.org/D76662
More information about the All-commits
mailing list