]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r340137: rtld: move relro enforcement after ifunc processing
authoremaste <emaste@FreeBSD.org>
Wed, 7 Nov 2018 18:12:18 +0000 (18:12 +0000)
committeremaste <emaste@FreeBSD.org>
Wed, 7 Nov 2018 18:12:18 +0000 (18:12 +0000)
commitdc29eaa0d06616df0a37a4e2a6fe6768072e7c6c
tree9381b47d9e7a2faf972966ec445e0e330ea2490f
parent1c9e4a253c668c74a12d03de9806c2030e78c514
MFC r340137: rtld: move relro enforcement after ifunc processing

Previously the combination of relro (implicit), -z now and ifunc use
resulted in a segfault when applying ifuncs after relro (test binary
here just calls amd64_get_fsbase()):

| % env LD_DEBUG=1 libexec/rtld-elf/obj/ld-elf.so.1 a.out
| ...
| enforcing main obj relro
| ...
| resolving ifuncs
| reloc_jmpslot: *0x203198 = 0x189368ea4570
| zsh: bus error (core dumped)  LD_DEBUG=1 obj/ld-elf.so.1 ~/a.out
libexec/rtld-elf/rtld.c