From d6b5d570a3255d8dc80e07c3674594574cd98fe7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 31 Jan 2002 03:41:25 +0000 Subject: Update. 2002-01-30 Ulrich Drepper * Versions.def [ld]: Add GLIBC_2.3. * elf/dl-addr.c: Move global variables for SHARED code in struct _rtld_global. Export this struct, remove all exports for the signal variables. * elf/dl-close.c: Likewise. * elf/dl-conflict.c: Likewise. * elf/dl-debug.c: Likewise. * elf/dl-deps.c: Likewise. * elf/dl-dst.h: Likewise. * elf/dl-error.c: Likewise. * elf/dl-fini.c: Likewise. * elf/dl-init.c: Likewise. * elf/dl-iteratephdr.c: Likewise. * elf/dl-libc.c: Likewise. * elf/dl-load.c: Likewise. * elf/dl-lookup.c: Likewise. * elf/dl-minimal.c: Likewise. * elf/dl-object.c: Likewise. * elf/dl-open.c: Likewise. * elf/dl-profile.c: Likewise. * elf/dl-profstub.c: Likewise. * elf/dl-reloc.c: Likewise. * elf/dl-runtime.c: Likewise. * elf/dl-support.c: Likewise. * elf/dl-sym.c: Likewise. * elf/dl-version.c: Likewise. * elf/do-lookup.h: Likewise. * elf/do-rel.h: Likewise. * elf/dynamic-link.h: Likewise. * elf/rtld.c: Likewise. * sysdeps/generic/dl-cache.c: Likewise. * sysdeps/generic/dl-sysdep.c: Likewise. * sysdeps/generic/ldsodefs.h: Likewise. * sysdeps/generic/libc-start.c: Likewise. * sysdeps/i386/dl-machine.h: Likewise. * sysdeps/ia64/dl-fptr.c: Likewise. * sysdeps/ia64/dl-machine.h: Likewise. * sysdeps/unix/sysv/linux/dl-librecon.h: Likewise. * sysdeps/unix/sysv/linux/dl-origin.c: Likewise. * sysdeps/unix/sysv/linux/dl-osinfo.h: Likewise. * sysdeps/unix/sysv/linux/getclktck.c: Likewise. * sysdeps/unix/sysv/linux/getpagesize.c: Likewise. * sysdeps/unix/sysv/linux/i386/dl-librecon.h: Likewise. * sysdeps/unix/sysv/linux/ia64/dl-static.c: Likewise. * sysdeps/unix/sysv/linux/ia64/getpagesize.c: Likewise. * malloc/thread-m.h: Spinlock definitions for x86/x86_64. --- sysdeps/unix/sysv/linux/dl-librecon.h | 2 +- sysdeps/unix/sysv/linux/dl-origin.c | 9 ++++----- sysdeps/unix/sysv/linux/dl-osinfo.h | 4 ++-- sysdeps/unix/sysv/linux/getclktck.c | 8 ++++---- sysdeps/unix/sysv/linux/getpagesize.c | 10 +++++----- sysdeps/unix/sysv/linux/i386/dl-librecon.h | 12 ++++++------ sysdeps/unix/sysv/linux/ia64/dl-static.c | 4 ++-- sysdeps/unix/sysv/linux/ia64/getpagesize.c | 7 +++---- 8 files changed, 27 insertions(+), 29 deletions(-) (limited to 'sysdeps/unix/sysv') diff --git a/sysdeps/unix/sysv/linux/dl-librecon.h b/sysdeps/unix/sysv/linux/dl-librecon.h index 5c34d00edb..d98afcb8a8 100644 --- a/sysdeps/unix/sysv/linux/dl-librecon.h +++ b/sysdeps/unix/sysv/linux/dl-librecon.h @@ -42,7 +42,7 @@ break; \ } \ if (osversion) \ - _dl_osversion = osversion; \ + GL(dl_osversion) = osversion; \ break; \ } diff --git a/sysdeps/unix/sysv/linux/dl-origin.c b/sysdeps/unix/sysv/linux/dl-origin.c index 9149a0a4de..90add58ef5 100644 --- a/sysdeps/unix/sysv/linux/dl-origin.c +++ b/sysdeps/unix/sysv/linux/dl-origin.c @@ -1,5 +1,5 @@ /* Find path of executable. - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -29,7 +29,6 @@ /* On Linux >= 2.1 systems which have the dcache implementation we can get the path of the application from the /proc/self/exe symlink. Try this first and fall back on the generic method if necessary. */ -extern const char *_dl_origin_path; const char * _dl_get_origin (void) @@ -55,15 +54,15 @@ _dl_get_origin (void) result = (char *) -1; /* We use the environment variable LD_ORIGIN_PATH. If it is set make a copy and strip out trailing slashes. */ - if (_dl_origin_path != NULL) + if (GL(dl_origin_path) != NULL) { - size_t len = strlen (_dl_origin_path); + size_t len = strlen (GL(dl_origin_path)); result = malloc (len + 1); if (result == NULL) result = (char *) -1; else { - char *cp = __mempcpy (result, _dl_origin_path, len); + char *cp = __mempcpy (result, GL(dl_origin_path), len); while (cp > result + 1 && cp[-1] == '/') --cp; *cp = '\0'; diff --git a/sysdeps/unix/sysv/linux/dl-osinfo.h b/sysdeps/unix/sysv/linux/dl-osinfo.h index 4976b3126d..1510b5b8c7 100644 --- a/sysdeps/unix/sysv/linux/dl-osinfo.h +++ b/sysdeps/unix/sysv/linux/dl-osinfo.h @@ -1,5 +1,5 @@ /* Operating system specific code for generic dynamic loader functions. - Copyright (C) 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002 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 @@ -103,6 +103,6 @@ dl_fatal (const char *str) /* Not sufficent. */ \ FATAL ("FATAL: kernel too old\n"); \ \ - _dl_osversion = version; \ + GL(dl_osversion) = version; \ } \ } while (0) diff --git a/sysdeps/unix/sysv/linux/getclktck.c b/sysdeps/unix/sysv/linux/getclktck.c index 57deaa3727..dc8ec9b50b 100644 --- a/sysdeps/unix/sysv/linux/getclktck.c +++ b/sysdeps/unix/sysv/linux/getclktck.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 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 @@ -18,6 +18,8 @@ #include +#include + #ifndef SYSTEM_CLK_TCK # define SYSTEM_CLK_TCK 100 #endif @@ -26,7 +28,5 @@ int __getclktck () { - extern int _dl_clktck; /* Defined in dl-load.c. */ - - return _dl_clktck ?: SYSTEM_CLK_TCK; + return GL(dl_clktck) ?: SYSTEM_CLK_TCK; } diff --git a/sysdeps/unix/sysv/linux/getpagesize.c b/sysdeps/unix/sysv/linux/getpagesize.c index a1796e8714..f030abc61b 100644 --- a/sysdeps/unix/sysv/linux/getpagesize.c +++ b/sysdeps/unix/sysv/linux/getpagesize.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,1992,1995,1996,1997,2000 Free Software Foundation, Inc. +/* Copyright (C) 1991,1992,1995-1997,2000,2002 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 @@ -19,14 +19,14 @@ #include #include +#include + /* Return the system page size. */ int __getpagesize () { - extern size_t _dl_pagesize; - - if (_dl_pagesize != 0) - return _dl_pagesize; + if (GL(dl_pagesize) != 0) + return GL(dl_pagesize); #ifdef EXEC_PAGESIZE return EXEC_PAGESIZE; diff --git a/sysdeps/unix/sysv/linux/i386/dl-librecon.h b/sysdeps/unix/sysv/linux/i386/dl-librecon.h index 3e39a32e69..e01631146a 100644 --- a/sysdeps/unix/sysv/linux/i386/dl-librecon.h +++ b/sysdeps/unix/sysv/linux/i386/dl-librecon.h @@ -1,5 +1,5 @@ /* Optional code to distinguish library flavours. - Copyright (C) 1998, 2001 Free Software Foundation, Inc. + Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -27,15 +27,15 @@ /* We have to find out whether the binary is linked against \ libc 5 or glibc. We do this by looking at all the DT_NEEDED \ entries. If one is libc.so.5 this is a libc 5 linked binary. */ \ - if (_dl_loaded->l_info[DT_NEEDED]) \ + if (GL(dl_loaded)->l_info[DT_NEEDED]) \ { \ /* We have dependencies. */ \ const ElfW(Dyn) *d; \ const char *strtab; \ \ - strtab = (const char *) D_PTR (_dl_loaded, l_info[DT_STRTAB]); \ + strtab = (const char *) D_PTR (GL(dl_loaded), l_info[DT_STRTAB]); \ \ - for (d = _dl_loaded->l_ld; d->d_tag != DT_NULL; ++d) \ + for (d = GL(dl_loaded)->l_ld; d->d_tag != DT_NULL; ++d) \ if (d->d_tag == DT_NEEDED \ && strcmp (strtab + d->d_un.d_val, "libc.so.5") == 0) \ break; \ @@ -67,14 +67,14 @@ break; \ } \ if (osversion) \ - _dl_osversion = osversion; \ + GL(dl_osversion) = osversion; \ break; \ } \ \ case 15: \ if (memcmp (envline, "LIBRARY_VERSION", 15) == 0) \ { \ - _dl_correct_cache_id = envline[16] == '5' ? 2 : 3; \ + GL(dl_correct_cache_id) = envline[16] == '5' ? 2 : 3; \ break; \ } diff --git a/sysdeps/unix/sysv/linux/ia64/dl-static.c b/sysdeps/unix/sysv/linux/ia64/dl-static.c index 8be9d58b01..f74353e725 100644 --- a/sysdeps/unix/sysv/linux/ia64/dl-static.c +++ b/sysdeps/unix/sysv/linux/ia64/dl-static.c @@ -33,8 +33,8 @@ _dl_var_init (void *array[]) DL_CLKTCK }; - _dl_pagesize = *((size_t *) array[DL_PAGESIZE]); - _dl_clktck = *((int *) array[DL_CLKTCK]); + GL(dl_pagesize) = *((size_t *) array[DL_PAGESIZE]); + GL(dl_clktck) = *((int *) array[DL_CLKTCK]); } #else diff --git a/sysdeps/unix/sysv/linux/ia64/getpagesize.c b/sysdeps/unix/sysv/linux/ia64/getpagesize.c index 67d0a3a5c2..0f1f8e13ed 100644 --- a/sysdeps/unix/sysv/linux/ia64/getpagesize.c +++ b/sysdeps/unix/sysv/linux/ia64/getpagesize.c @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -28,13 +29,11 @@ determine the page size to ensure proper alignment for calls such as mmap and friends. --davidm 99/11/30 */ -extern size_t _dl_pagesize; - int __getpagesize () { - assert (_dl_pagesize != 0); - return _dl_pagesize; + assert (GL(dl_pagesize) != 0); + return GL(dl_pagesize); } weak_alias (__getpagesize, getpagesize) -- cgit 1.4.1