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

Rafael Espíndola via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 6 13:26:07 PST 2015


And please rebase on top of trunk :-)

On 6 November 2015 at 16:23, Rafael Ávila de Espíndola
<llvm-commits at lists.llvm.org> wrote:
> 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
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list