[PATCH] D40029: [ELF] Only add contiguous isRelro sections to PT_GNU_RELRO PHDR

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 16 10:14:56 PST 2017


Rafael Avila de Espindola <rafael.espindola at gmail.com> writes:

> My opinions on this so far are
>
> There should be just one PT_GNU_RELRO. We should try to get the dynamic
> linkers changed only if there is a direct advantaged to having multiple
> versus having the static linker putting the data in the right order.
>
> I am OK with producing an error if a linker script would have caused
> mulitple PT_GNU_RELRO to be created.
>
> We can probably ignore empty sections when decided the PT_GNU_RELRO
> start and end. This means we would have an error only when there is a ro
> copy relocation.
>
> Can we rename the section to .data.rel.ro.bss but keep the current
> flags or would bfd error out with bss data not in the end of a PT_LOAD?

And by bfd I mean lld using bfd's script. That is is I called
ld.frankenstein during earlier linker script development.

Cheers,
Rafael


More information about the llvm-commits mailing list