rtld: Apply relro to itself.

Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D25319
This commit is contained in:
Konstantin Belousov 2020-06-18 23:07:58 +00:00
parent e0b322ae78
commit 7e400f1ade
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=362347

View File

@ -2280,6 +2280,7 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo **aux_info)
obj_rtld.path = xstrdup(ld_path_rtld);
parse_rtld_phdr(&obj_rtld);
obj_enforce_relro(&obj_rtld);
r_debug.r_brk = r_debug_state;
r_debug.r_state = RT_CONSISTENT;