[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
Fri Nov 6 13:23:12 PST 2015
rafael added inline comments.
================
Comment at: ELF/Writer.cpp:317
@@ +316,3 @@
+// be included into GNU_RELRO but .got.plt will still be writable.
+static int8_t getRelroSectionRank(StringRef SectionName) {
+ return StringSwitch<int8_t>(SectionName)
----------------
Please don't do this.
The constraint that we have is that now the RW PT_LOAD is split in two parts. The bits that become ro after relacations are applied and the ones that don't.
You can implement that directly in the comparison function.
Also, I think we may as well always sort like that.
http://reviews.llvm.org/D14218
More information about the llvm-commits
mailing list