diff options
| author | Suleiman Souhlal <ssouhlal@FreeBSD.org> | 2004-11-02 09:42:21 +0000 |
|---|---|---|
| committer | Suleiman Souhlal <ssouhlal@FreeBSD.org> | 2004-11-02 09:42:21 +0000 |
| commit | 5bbd22ee8d244659355a6ab776a025d1e83b5e5d (patch) | |
| tree | b69d7e0fc2f1380a7be2b1ab780f469fa83b923a | |
| parent | 310814ced917f9717c469defbc1a9c75ef23df80 (diff) | |
Notes
| -rw-r--r-- | libexec/rtld-elf/rtld.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 5740e9101d4c8..2741c1378979c 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -390,6 +390,17 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp) exit (0); } + /* setup TLS for main thread */ + dbg("initializing initial thread local storage"); + STAILQ_FOREACH(entry, &list_main, link) { + /* + * Allocate all the initial objects out of the static TLS + * block even if they didn't ask for it. + */ + allocate_tls_offset(entry->obj); + } + allocate_initial_tls(obj_list); + if (relocate_objects(obj_main, ld_bind_now != NULL && *ld_bind_now != '\0', &obj_rtld) == -1) die(); @@ -410,17 +421,6 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp) dbg("initializing thread locks"); lockdflt_init(); - /* setup TLS for main thread */ - dbg("initializing initial thread local storage"); - STAILQ_FOREACH(entry, &list_main, link) { - /* - * Allocate all the initial objects out of the static TLS - * block even if they didn't ask for it. - */ - allocate_tls_offset(entry->obj); - } - allocate_initial_tls(obj_list); - /* Make a list of init functions to call. */ objlist_init(&initlist); initlist_add_objects(obj_list, preload_tail, &initlist); |
