mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
Update.
2002-01-30 Ulrich Drepper <drepper@redhat.com> * 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.
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
break; \
|
||||
} \
|
||||
if (osversion) \
|
||||
_dl_osversion = osversion; \
|
||||
GL(dl_osversion) = osversion; \
|
||||
break; \
|
||||
}
|
||||
|
||||
|
||||
@@ -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 <drepper@cygnus.com>, 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';
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 <time.h>
|
||||
|
||||
#include <ldsodefs.h>
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
@@ -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 <unistd.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
#include <ldsodefs.h>
|
||||
|
||||
/* 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;
|
||||
|
||||
@@ -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 <drepper@cygnus.com>, 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; \
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
#include <ldsodefs.h>
|
||||
#include <sysdep.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user