Look for a PT_GNU_RELRO section and, if present, mprotect that range
authorguenther <guenther@openbsd.org>
Mon, 8 Aug 2016 22:05:26 +0000 (22:05 +0000)
committerguenther <guenther@openbsd.org>
Mon, 8 Aug 2016 22:05:26 +0000 (22:05 +0000)
commit45ae28e3c073931e77538a0babb458e29c066364
tree7b0158b24a00dd9f132948e15344024a31a69ed3
parent660c432f5961aa4240ca88f573df7bfbf65eda27
Look for a PT_GNU_RELRO section and, if present, mprotect that range
instead of the [__got_start, __got_end) range.

Also, instead of mprotecting the [__plt_start, __plt_end) range,
just scan for sections which are both writable and executable and
mprotect them to read-only.  (This part was stolen from kettenis@)

ok kettenis@
lib/csu/boot.h