Пример #1
0
_libc_init(void)
{

	if (libc_initialised)
		return;

	libc_initialised = 1;

	if (__ps_strings != NULL)
		__libc_dlauxinfo = __ps_strings->ps_argvstr +
		    __ps_strings->ps_nargvstr + __ps_strings->ps_nenvstr + 2;

	/* For -fstack-protector */
	__guard_setup();

	/* Atomic operations */
	__libc_atomic_init();

/* XXX: we don't have tls */
#if 0
#if defined(__HAVE_TLS_VARIANT_I) || defined(__HAVE_TLS_VARIANT_II)
	/* Initialize TLS for statically linked programs. */
	__libc_static_tls_setup();
#endif
#endif

	/* Threads */
	__libc_thr_init();

	/* Initialize the atexit mutexes */
	__libc_atexit_init();

	/* Initialize environment memory RB tree. */
	__libc_env_init();
}
Пример #2
0
/* LINTED used */
void
__libc_init(void)
{

	/* For -fstack-protector */
	__guard_setup();

	/* Atomic operations */
	__libc_atomic_init();

#ifdef _REENTRANT
	/* Threads */
	__libc_thr_init();
#endif

	/* Initialize the atexit mutexes */
	__libc_atexit_init();

	/* Initialize environment memory RB tree. */
	__libc_env_init();
}