freebsd-skq/libexec/rtld-elf
emaste 04e0acd935 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

Reported by:	Shawn Webb
Reviewed by:	kib
Sponsored by:	The FreeBSD Foundation
2018-11-04 19:21:12 +00:00
..
aarch64 rtld-elf: compile with WANRS=4 warnings other than -Wcast-align 2018-10-29 21:08:19 +00:00
amd64 Remove rtld use of libc amd64_set_fsbase(). 2018-10-29 23:59:26 +00:00
arm rtld-elf: compile with WANRS=4 warnings other than -Wcast-align 2018-10-29 21:08:19 +00:00
i386 rtld-elf: compile with WANRS=4 warnings other than -Wcast-align 2018-10-29 21:08:19 +00:00
mips rtld-elf: compile with WANRS=4 warnings other than -Wcast-align 2018-10-29 21:08:19 +00:00
powerpc Flush data cache for executable loadable segments explicitly. 2018-11-03 20:39:16 +00:00
powerpc64 Flush data cache for executable loadable segments explicitly. 2018-11-03 20:39:16 +00:00
riscv rtld-elf: fix more warnings to allow compiling with WARNS=6 2018-10-29 21:08:28 +00:00
sparc64 rtld-elf: compile with WANRS=4 warnings other than -Wcast-align 2018-10-29 21:08:19 +00:00
tests Fix regression tests broken by r337067. 2018-08-02 11:55:16 +00:00
debug.c libexec: adoption of SPDX licensing ID tags. 2017-11-27 15:25:02 +00:00
debug.h libexec: adoption of SPDX licensing ID tags. 2017-11-27 15:25:02 +00:00
libmap.c rtld-elf: fix more warnings to allow compiling with WARNS=6 2018-10-29 21:08:28 +00:00
libmap.conf Move libmap.conf to libexec/rtld-elf/ 2018-09-18 00:25:00 +00:00
libmap.h rtld-elf: make it compile with WARNS=3 2018-10-29 21:08:11 +00:00
Makefile rtld-elf: fix more warnings to allow compiling with WARNS=6 2018-10-29 21:08:28 +00:00
Makefile.depend new depends 2015-06-16 23:37:19 +00:00
malloc.c rtld-elf: fix more warnings to allow compiling with WARNS=6 2018-10-29 21:08:28 +00:00
map_object.c Remove Obj_Entry textsize member. 2018-11-04 00:32:28 +00:00
paths.h rtld-elf: compile with WANRS=4 warnings other than -Wcast-align 2018-10-29 21:08:19 +00:00
rtld_lock.c rtld-elf: fix more warnings to allow compiling with WARNS=6 2018-10-29 21:08:28 +00:00
rtld_lock.h libexec: adoption of SPDX licensing ID tags. 2017-11-27 15:25:02 +00:00
rtld_printf.c rtld-elf: fix more warnings to allow compiling with WARNS=6 2018-10-29 21:08:28 +00:00
rtld_printf.h libexec: adoption of SPDX licensing ID tags. 2017-11-27 15:25:02 +00:00
rtld_tls.h libexec: adoption of SPDX licensing ID tags. 2017-11-27 15:25:02 +00:00
rtld_utrace.h Renumber copyright clause 4 2017-02-28 23:42:47 +00:00
rtld.1 Add serial comma. 2017-09-01 16:56:37 +00:00
rtld.c rtld: move relro enforcement after ifunc processing 2018-11-04 19:21:12 +00:00
rtld.h Remove Obj_Entry textsize member. 2018-11-04 00:32:28 +00:00
Symbol.map Add rtld private interface for dso to detect dynamic loading 2015-01-03 18:09:53 +00:00
xmalloc.c libexec: adoption of SPDX licensing ID tags. 2017-11-27 15:25:02 +00:00