1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-06-16 17:41:01 +03:00
2001-01-05  H.J. Lu  <hjl@gnu.org>

	* elf/dl-support.c (non_dynamic_init): Move the auxiliary
	vector checking to ...
	(_dl_aux_init): Here. New function. Defined only if
	HAVE_AUX_VECTOR is defined.

	* sysdeps/generic/libc-start.c (__libc_start_main): Call
	_dl_aux_init for static binaries if HAVE_AUX_VECTOR is defined.

	* sysdeps/powerpc/elf/libc-start.c (__libc_start_main): Call
	_dl_aux_init.

	* sysdeps/unix/sysv/linux/ldsodefs.h (DL_FIND_AUXV): Removed.
	(HAVE_AUX_VECTOR): Defined.
	(_dl_aux_init): Declared.
This commit is contained in:
Ulrich Drepper
2001-01-07 02:00:21 +00:00
parent bf798a9534
commit e4a5f77de6
6 changed files with 45 additions and 24 deletions

View File

@ -59,6 +59,10 @@ BP_SYM (__libc_start_main) (int (*main) (int, char **, char **),
#endif
#ifndef SHARED
# ifdef HAVE_AUX_VECTOR
void *__unbounded *__unbounded auxvec;
# endif
/* The next variable is only here to work around a bug in gcc <= 2.7.2.2.
If the address would be taken inside the expression the optimizer
would try to be too smart and throws it away. Grrr. */
@ -85,6 +89,13 @@ BP_SYM (__libc_start_main) (int (*main) (int, char **, char **),
loader did the work already. */
if (__builtin_expect (__libc_enable_secure, 0))
__libc_check_standard_fds ();
# ifdef HAVE_AUX_VECTOR
for (auxvec = (void *__unbounded *__unbounded) ubp_ev;
*auxvec; auxvec++);
++auxvec;
_dl_aux_init ((ElfW(auxv_t) *) auxvec);
# endif
#endif
/* Register the destructor of the dynamic linker if there is any. */