1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

* sysdeps/powerpc/elf/libc-start.c (AUX_VECTOR_INIT): Define it.

(LIBC_START_MAIN, LIBC_START_MAIN_AUXVEC_ARG, MAIN_AUXVEC_ARG)
	(INIT_MAIN_ARGS): Define, and #include <sysdeps/generic/libc-start.c>.
	(__libc_start_main): Just call the generic one for most of the work.

	* sysdeps/generic/libc-start.c [LIBC_START_MAIN]: If defined, define a
	static function by that name instead of BP_SYM (__libc_start_main).
	[LIBC_START_MAIN_AUXVEC_ARG]: Take AUXVEC as argument.
	[MAIN_AUXVEC_ARG]: Pass 4th argument to MAIN.
	[INIT_MAIN_ARGS]: Give INIT the same args as MAIN.

	* sysdeps/generic/dl-sysdep.c (_dl_sysdep_start) [DL_PLATFORM_AUXV]:
	Use this macro for extra AT_* cases.
	* sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c (DL_PLATFORM_AUXV):
	New macro, guts from ...
	(__aux_init_cache): ... here, function removed.
	(DL_PLATFORM_INIT): Don't define this.

	* sysdeps/powerpc/powerpc32/memset.S: Put __cache_line_size in bss.
	* sysdeps/powerpc/powerpc64/memset.S: Likewise.

	* Versions.def (libthread_db): Add GLICB_2.3.3 set.
This commit is contained in:
Roland McGrath
2003-03-15 23:09:52 +00:00
parent 2b089f2101
commit 124dcac84b
7 changed files with 128 additions and 194 deletions

View File

@ -1,5 +1,5 @@
/* Operating system support for run-time dynamic linker. Linux/PPC version.
Copyright (C) 1997, 1998, 2001 Free Software Foundation, Inc.
Copyright (C) 1997, 1998, 2001, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@ -25,27 +25,18 @@
extern int __cache_line_size;
weak_extern (__cache_line_size)
#define DL_PLATFORM_INIT __aux_init_cache(_dl_auxv)
/* Scan the Aux Vector for the "Data Cache Block Size" entry. If found
verify that the static extern __cache_line_size is defined by checking
for not NULL. If it is defined then assign the cache block size
for not NULL. If it is defined then assign the cache block size
value to __cache_line_size. */
static inline void
__aux_init_cache (ElfW(auxv_t) *av)
{
for (; av->a_type != AT_NULL; ++av)
switch (av->a_type)
{
case AT_DCACHEBSIZE:
{
int *cls = & __cache_line_size;
if (cls != NULL)
*cls = av->a_un.a_val;
}
break;
}
}
#define DL_PLATFORM_AUXV \
case AT_DCACHEBSIZE: \
{ \
int *cls = & __cache_line_size; \
if (cls != NULL) \
*cls = av->a_un.a_val; \
} \
break;
#ifndef __ASSUME_STD_AUXV
@ -78,4 +69,4 @@ __aux_init_cache (ElfW(auxv_t) *av)
} while (0)
#endif
#include <sysdeps/unix/sysv/linux/dl-sysdep.c>
#include_next <sysdeps/unix/sysv/linux/dl-sysdep.c>