[llvm] r364675 - Default to Secure PLT on PPC for musl libc.
Brad Smith via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 28 12:48:32 PDT 2019
Author: brad
Date: Fri Jun 28 12:48:31 2019
New Revision: 364675
URL: http://llvm.org/viewvc/llvm-project?rev=364675&view=rev
Log:
Default to Secure PLT on PPC for musl libc.
This matches the default settings of clang.
Modified:
llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp
llvm/trunk/test/CodeGen/PowerPC/ppc32-pic-large.ll
Modified: llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp?rev=364675&r1=364674&r2=364675&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCSubtarget.cpp Fri Jun 28 12:48:31 2019
@@ -145,7 +145,8 @@ void PPCSubtarget::initSubtargetFeatures
if (isDarwin())
HasLazyResolverStubs = true;
- if (TargetTriple.isOSNetBSD() || TargetTriple.isOSOpenBSD())
+ if (TargetTriple.isOSNetBSD() || TargetTriple.isOSOpenBSD() ||
+ TargetTriple.isMusl())
SecurePlt = true;
if (HasSPE && IsPPC64)
Modified: llvm/trunk/test/CodeGen/PowerPC/ppc32-pic-large.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/ppc32-pic-large.ll?rev=364675&r1=364674&r2=364675&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/ppc32-pic-large.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/ppc32-pic-large.ll Fri Jun 28 12:48:31 2019
@@ -4,6 +4,8 @@
; RUN: llc < %s -mtriple=powerpc-unknown-netbsd -relocation-model=pic | FileCheck -check-prefix=LARGE-SECUREPLT %s
; RUN: llc < %s -mtriple=powerpc-unknown-openbsd -mattr=+secure-plt -relocation-model=pic | FileCheck -check-prefix=LARGE-SECUREPLT %s
; RUN: llc < %s -mtriple=powerpc-unknown-openbsd -relocation-model=pic | FileCheck -check-prefix=LARGE-SECUREPLT %s
+; RUN: llc < %s -mtriple=powerpc-linux-musl -mattr=+secure-plt -relocation-model=pic | FileCheck -check-prefix=LARGE-SECUREPLT %s
+; RUN: llc < %s -mtriple=powerpc-linux-musl -relocation-model=pic | FileCheck -check-prefix=LARGE-SECUREPLT %s
@bar = common global i32 0, align 4
declare i32 @call_foo(i32, ...)
More information about the llvm-commits
mailing list