This patch supports secure PLT mode for PowerPC 32 architecture. I'm planning to add patch that supports -msecure-plt option in clang also.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Updated patch so it covers cases where we have just function call, without global variables as arguments or global variables used within function.
test/CodeGen/PowerPC/secure-plt.ll | ||
---|---|---|
37 ↗ | (On Diff #136531) | Instead of providing this as NO-SECURE-PLT-NOT, such that you're saying it's *not* generating secure PLT, can you instead check for BSS-PLT, and use the BSS PLT asm? You could put this in the already existing ppc32-pic.ll and ppc32-pic-large.ll |
test/CodeGen/PowerPC/ppc32-pic-large.ll | ||
---|---|---|
14 | I meant instead of copying the same code into these two files and getting the same result as I already put in here, have two RUN lines in the ppc32-pic-large.ll/ppc32-pic.ll -- the existing RUN line, and an additional line to test secure-plt. Then we'd have lines of LARGE-BSS and LARGE-BSS-SECUREPLT, or such. The change you made here is effectively just duplicating the test I already wrote. |
test/CodeGen/PowerPC/ppc32-pic-large.ll | ||
---|---|---|
14 | Since this solution doesn't support small pic mode, is it OK just to add secure plt checks in ppc32-pic-large.ll ? |
test/CodeGen/PowerPC/ppc32-pic-large.ll | ||
---|---|---|
14 | That's fine with me. |
It should be kept in mind that secure PLT is desirable for certain cases with non-position independent code as well. Even in static binaries it can be desirable... But that is for a follow-up patch.
I meant instead of copying the same code into these two files and getting the same result as I already put in here, have two RUN lines in the ppc32-pic-large.ll/ppc32-pic.ll -- the existing RUN line, and an additional line to test secure-plt.
Then we'd have lines of LARGE-BSS and LARGE-BSS-SECUREPLT, or such.
The change you made here is effectively just duplicating the test I already wrote.