[PATCH] D14218: [ELF2] Implements -z relro: create an ELF "PT_GNU_RELRO" segment header in the object.

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 17:15:41 PST 2015


rafael added inline comments.

================
Comment at: ELF/Writer.cpp:368
@@ +367,3 @@
+
+  StringRef Name = Sec->getName();
+  if (Name == ".got.plt")
----------------
Thin can be just Sec == &GotPlt, no?

================
Comment at: ELF/Writer.cpp:371
@@ +370,3 @@
+    return Config->ZNow;
+  StringRef WhiteList[] = {".data.rel.ro", ".ctors", ".dtors",  ".jcr",
+                           ".eh_frame",    ".got",   ".dynamic"};
----------------
Check for &Dynamic and &Got instead of the names.


http://reviews.llvm.org/D14218





More information about the llvm-commits mailing list