[PATCH] D59185: [PowerPC] Set the default PLT mode on musl to Secure PLT

A. Wilcox via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 9 20:52:09 PST 2019


awilfox created this revision.
awilfox added reviewers: nemanjai, jhibbits.
Herald added subscribers: cfe-commits, jsji, kbarton.
Herald added a project: clang.

The musl libc only supports Secure PLT.


Repository:
  rC Clang

https://reviews.llvm.org/D59185

Files:
  lib/Driver/ToolChains/Arch/PPC.cpp


Index: lib/Driver/ToolChains/Arch/PPC.cpp
===================================================================
--- lib/Driver/ToolChains/Arch/PPC.cpp
+++ lib/Driver/ToolChains/Arch/PPC.cpp
@@ -115,7 +115,7 @@
                                               const ArgList &Args) {
   if (Args.getLastArg(options::OPT_msecure_plt))
     return ppc::ReadGOTPtrMode::SecurePlt;
-  if (Triple.isOSNetBSD() || Triple.isOSOpenBSD())
+  if (Triple.isOSNetBSD() || Triple.isOSOpenBSD() || Triple.isMusl())
     return ppc::ReadGOTPtrMode::SecurePlt;
   else
     return ppc::ReadGOTPtrMode::Bss;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59185.190003.patch
Type: text/x-patch
Size: 585 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190310/84963137/attachment.bin>


More information about the cfe-commits mailing list