Look for a PT_GNU_RELRO section per object and, if present, mprotect that
authorguenther <guenther@openbsd.org>
Mon, 8 Aug 2016 21:59:20 +0000 (21:59 +0000)
committerguenther <guenther@openbsd.org>
Mon, 8 Aug 2016 21:59:20 +0000 (21:59 +0000)
commit660c432f5961aa4240ca88f573df7bfbf65eda27
tree880f6f501653e125bb06cb295a5106b1a481fe65
parent1a0cb582fd7468efb5010e6b434db6f2e5a31e0f
Look for a PT_GNU_RELRO section per object and, if present, mprotect that
range instead of the [__got_start, __got_end) range.
On many archs this will cover _DYNAMIC too, so move up the DT_DEBUG handling
to before relocations and the mprotect are done.

ok kettenis@
libexec/ld.so/library.c
libexec/ld.so/library_mquery.c
libexec/ld.so/loader.c
libexec/ld.so/resolve.c
libexec/ld.so/resolve.h