This patch enables option for secure plt mode in clang (-msecure-plt). This feature is supported in backend also (https://reviews.llvm.org/D42112).
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I'll let Justin give the actual ACK, but this looks fine to me. The only question that I have (since I don't know anything about secure PLT) is whether this is a PPC-specific thing (since the option is a PPC option).
include/clang/Driver/Options.td | ||
---|---|---|
1941 ↗ | (On Diff #139904) | Do we not want the negated option? |
lib/Driver/ToolChains/Arch/PPC.cpp | ||
116 ↗ | (On Diff #139904) | Just a style question out of curiosity. Why the temporary? Since there are just two possible values, why not just return the respective enumerator? |
include/clang/Driver/Options.td | ||
---|---|---|
1941 ↗ | (On Diff #139904) | Well, I'm not sure if we need negated option. This is just switch from default mode (BSS) to SECURE PLT mode, also I didn't see that gcc has negated option for SECURE-PLT. |
lib/Driver/ToolChains/Arch/PPC.cpp | ||
116 ↗ | (On Diff #139904) | You are right, we don't need the temporary. |
GCC supports -mbss-plt to get the legacy behavior. Not sure if anyone actually uses it though.
-mbss-plt is currently default in LLVM, once secure plt support is finished we can set secure plt as default in LLVM, but not for now.