[PATCH] D20024: [ELF] - Protect first entries of got.plt with RelRo.

Ed Maste via llvm-commits llvm-commits at lists.llvm.org
Fri May 6 13:50:28 PDT 2016


emaste added a subscriber: emaste.
emaste added a comment.

> If going for safety you should really disable lazy loading or even just compile with -fno-plt.


This patch is not terribly complex, but I also suspect that in practice folks will use -zrelro & -znow if this is a concern.


================
Comment at: ELF/OutputSections.h:92
@@ -89,3 +91,3 @@
 
-  // If true, this section will be page aligned on disk.
+  // If not PageAlignKind::None this section will be page aligned on disk.
   // Typically the first section of each PT_LOAD segment has this flag.
----------------
This comment is now confusing to me -- "page aligned" isn't how I'd describe the effect of PageAlignKind::GotPlt. What about just describing these three types where the enum is defined?


http://reviews.llvm.org/D20024





More information about the llvm-commits mailing list