Просмотр исходного кода

Change the order in which '__uClibc_init' is called. In the case of NPTL, some auxillary TLS set up has to happen beforehand. This has been tested for almost two months now and I am tired of chasing it around in my merges. Look in the NPTL trunk if you want more information.

"Steven J. Hill" 18 лет назад
Родитель
Сommit
f14d34240c
1 измененных файлов с 5 добавлено и 4 удалено
  1. 5 4
      libc/misc/internals/__uClibc_main.c

+ 5 - 4
libc/misc/internals/__uClibc_main.c

@@ -242,10 +242,6 @@ __uClibc_main(int (*main)(int, char **, char **), int argc,
     ElfW(auxv_t) auxvt[AT_EGID + 1];
 #endif
     __libc_stack_end = stack_end;
-    /* We need to initialize uClibc.  If we are dynamically linked this
-     * may have already been completed by the shared lib loader.  We call
-     * __uClibc_init() regardless, to be sure the right thing happens. */
-    __uClibc_init();
 
     __rtld_fini = rtld_fini;
 
@@ -274,6 +270,11 @@ __uClibc_main(int (*main)(int, char **, char **), int argc,
 	aux_dat += 2;
     }
 
+    /* We need to initialize uClibc.  If we are dynamically linked this
+     * may have already been completed by the shared lib loader.  We call
+     * __uClibc_init() regardless, to be sure the right thing happens. */
+    __uClibc_init();
+
     /* Make certain getpagesize() gives the correct answer */
     __pagesize = (auxvt[AT_PAGESZ].a_un.a_val)? auxvt[AT_PAGESZ].a_un.a_val : PAGE_SIZE;