mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-18 15:30:21 +00:00
Postpone the resolution of IRELATIVE relocations and IFUNC-targeted
relocations until tls is initialized and stacks permissions correctly set. This allows the ifunc to call malloc(3) and some other heavy services. Add debug banner. MFC after: 3 days
This commit is contained in:
parent
3079d69f90
commit
68266d5aba
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=229508
@ -515,10 +515,6 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp)
|
||||
ld_bind_now != NULL && *ld_bind_now != '\0', &obj_rtld, NULL) == -1)
|
||||
die();
|
||||
|
||||
if (resolve_objects_ifunc(obj_main,
|
||||
ld_bind_now != NULL && *ld_bind_now != '\0', NULL) == -1)
|
||||
die();
|
||||
|
||||
dbg("doing copy relocations");
|
||||
if (do_copy_relocations(obj_main) == -1)
|
||||
die();
|
||||
@ -549,6 +545,11 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp)
|
||||
|
||||
map_stacks_exec(NULL);
|
||||
|
||||
dbg("resolving ifuncs");
|
||||
if (resolve_objects_ifunc(obj_main,
|
||||
ld_bind_now != NULL && *ld_bind_now != '\0', NULL) == -1)
|
||||
die();
|
||||
|
||||
wlock_acquire(rtld_bind_lock, &lockstate);
|
||||
objlist_call_init(&initlist, &lockstate);
|
||||
objlist_clear(&initlist);
|
||||
|
Loading…
Reference in New Issue
Block a user