diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc')
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/Makefile | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/dl-vdso.c | 59 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/dl-vdso.h | 27 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/libc-start.c | 42 |
5 files changed, 23 insertions, 109 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/Makefile b/sysdeps/unix/sysv/linux/powerpc/Makefile index ecd8057951..d1281cf469 100644 --- a/sysdeps/unix/sysv/linux/powerpc/Makefile +++ b/sysdeps/unix/sysv/linux/powerpc/Makefile @@ -8,5 +8,5 @@ gen-as-const-headers += ucontext_i.sym endif ifeq ($(subdir),elf) -routines += dl-vdso +sysdep_routines += dl-vdso endif diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h b/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h index f20a5a175c..746d9ced4a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h @@ -23,7 +23,7 @@ #ifdef SHARED -extern void *__vdso_gettimeofday; +extern void *__vdso_gettimeofday attribute_hidden; extern void *__vdso_clock_gettime; diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-vdso.c b/sysdeps/unix/sysv/linux/powerpc/dl-vdso.c deleted file mode 100644 index e1be097734..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/dl-vdso.c +++ /dev/null @@ -1,59 +0,0 @@ -/* ELF symbol resolve functions for VDSO objects. - Copyright (C) 2005 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 - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#include "config.h" -#include <dl-hash.h> -#include <ldsodefs.h> - - -void * -internal_function -_dl_vdso_vsym (const char *name, const char *version) -{ - struct link_map *map = GLRO (dl_sysinfo_map); - void *value = NULL; - - - if (map != NULL) - { - /* Use a WEAK REF so we don't error out if the symbol is not found. */ - ElfW (Sym) wsym; - memset (&wsym, 0, sizeof (ElfW (Sym))); - wsym.st_info = (unsigned char) ELFW (ST_INFO (STB_WEAK, STT_NOTYPE)); - - /* Compute hash value to the version string. */ - struct r_found_version vers; - vers.name = version; - vers.hidden = 1; - vers.hash = _dl_elf_hash (version); - /* We don't have a specific file where the symbol can be found. */ - vers.filename = NULL; - - /* Search the scope of the vdso map. */ - const ElfW (Sym) *ref = &wsym; - lookup_t result = GLRO (dl_lookup_symbol_x) (name, map, &ref, - map->l_local_scope, - &vers, 0, 0, NULL); - - if (ref != NULL) - value = DL_SYMBOL_ADDRESS (result, ref); - } - - return value; -} diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-vdso.h b/sysdeps/unix/sysv/linux/powerpc/dl-vdso.h deleted file mode 100644 index a7dcb2e5ff..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/dl-vdso.h +++ /dev/null @@ -1,27 +0,0 @@ -/* ELF symbol resolve functions for VDSO objects. - Copyright (C) 2005 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 - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -#ifndef _DL_VDSO_H -#define _DL_VDSO_H 1 - -/* Functions for resolving symbols in the VDSO link map. */ -extern void *_dl_vdso_vsym (const char *name, const char *version) - internal_function attribute_hidden; - -#endif /* dl-vdso.h */ diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c index a71cfa5b06..d78876d40d 100644 --- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c +++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c @@ -24,23 +24,6 @@ #include <bp-start.h> #include <bp-sym.h> -int __cache_line_size attribute_hidden; -/* The main work is done in the generic function. */ -#define LIBC_START_MAIN generic_start_main -#define LIBC_START_DISABLE_INLINE -#define LIBC_START_MAIN_AUXVEC_ARG -#define MAIN_AUXVEC_ARG -#define INIT_MAIN_ARGS -#include <csu/libc-start.c> - -struct startup_info - { - void *__unbounded sda_base; - int (*main) (int, char **, char **, void *); - int (*init) (int, char **, char **, void *); - void (*fini) (void); - }; - #ifdef SHARED # include <sys/time.h> @@ -69,8 +52,28 @@ static inline void _libc_vdso_platform_setup (void) __vdso_get_tbfreq = _dl_vdso_vsym ("__kernel_vdso_get_tbfreq", "LINUX_2.6.15"); } + +# define VDSO_SETUP _libc_vdso_platform_setup #endif + +int __cache_line_size attribute_hidden; +/* The main work is done in the generic function. */ +#define LIBC_START_MAIN generic_start_main +#define LIBC_START_DISABLE_INLINE +#define LIBC_START_MAIN_AUXVEC_ARG +#define MAIN_AUXVEC_ARG +#define INIT_MAIN_ARGS +#include <csu/libc-start.c> + +struct startup_info + { + void *__unbounded sda_base; + int (*main) (int, char **, char **, void *); + int (*init) (int, char **, char **, void *); + void (*fini) (void); + }; + int /* GKM FIXME: GCC: this should get __BP_ prefix by virtue of the BPs in the arglist of startup_info.main and startup_info.init. */ @@ -117,10 +120,7 @@ int __cache_line_size = av->a_un.a_val; break; } -#ifdef SHARED - /* Resolve and initialize function pointers for VDSO functions. */ - _libc_vdso_platform_setup (); -#endif + return generic_start_main (stinfo->main, argc, ubp_av, auxvec, stinfo->init, stinfo->fini, rtld_fini, stack_on_entry); |