[PATCH] D45520: [PowerPC] add secure plt support for TLS symbols

Strahinja Petrovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 20 05:09:37 PDT 2018


spetrovic marked 2 inline comments as done.
spetrovic added a comment.

Regarding secure plt in general I was using this document: http://devpit.org/wiki/Debugging_PowerPC_ELF_Binaries. This patch just expands secure-plt support for TLS symbols, basically the same thing as for functions symbols or global symbols in the last patch. 
Also as a reference I'm using gcc.
I haven't run into example that fails because of shrink-wrapping. If this is a potential issue would not it have appeared so far, since 
 getGlobalBaseReg() is existing function and it was used before secure-plt support? Do you have some test case that potentially can reproduce issue related with shrink-wrapping?



================
Comment at: test/CodeGen/PowerPC/ppc32-secure-plt-tls.ll:13
+!0 = !{i32 7, !"PIC Level", i32 2}
+
+; SECURE-PLT-TLS:       mflr 30
----------------
nemanjai wrote:
> I imagine there's supposed to be code up here that sets up the base pointer. Do we not want to check for that code?
These 3 instructions (mflr,addis,addi) are setting up the base pointer. There is one more instruction in this sequence that I forgot to check (bl). I have added it in updated patch. 


Repository:
  rL LLVM

https://reviews.llvm.org/D45520





More information about the llvm-commits mailing list