From drepper@redhat.com Sat Apr 1 13:55:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Sat, 01 Apr 2000 13:55:00 -0000 Subject: another DL problem Message-ID: I'm currently reviewing the next draft for the next POSIX/XPG standard. And the dlclose description says that the implementation has to track dependencies established by the relocation and that this must prevent an object from actually being unloaded until the objects with the dependencies are also gone. Another triumph of people doing stupid things. The test case currently fails but the make will not abort. Take a look at the test in dlfcn. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Sat Apr 1 14:35:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Sat, 01 Apr 2000 14:35:00 -0000 Subject: next surprise Message-ID: The next thing in the standard draft which causes problems is that the getnetbyaddr function takes an uint32_t value for the first parameter. We currently use unsigned long (why?). This is not much of a problem but we are also using unsigned long in the struct netent definition. I've committed some changes to remove this difference from the standard. On 32 bit platforms we should have no problems. On 64 bit platforms the struct netent definition should be changed. I've currently only created a Linux/Alpha version as I don't think breaking the other 64 bit APIs is a problem (SPARC64, MIPS64, IA-64). IA-64 people: note that this is an incmopatible change if you are using a glibc 2.1 based version. There will be more of these changes and I've warned everybody in advance. One thing which probably should be done is to change the Alpha definition. It is currently struct netent { char *n_name; /* Official name of network. */ char **n_aliases; /* Alias list. */ int n_addrtype; /* Net address type. */ unsigned long int n_net; /* Network number. */ }; It should probably be struct netent { char *n_name; /* Official name of network. */ char **n_aliases; /* Alias list. */ int n_addrtype; /* Net address type. */ int __dummy1; uint32_t n_net; /* Network number. */ int __dummy2; }; or whatever is appropriate for the padding. There will be no binary compatibilities. Rth, can you take a look? -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From hjl@lucon.org Sun Apr 2 15:43:00 2000 From: hjl@lucon.org (H . J . Lu) Date: Sun, 02 Apr 2000 15:43:00 -0000 Subject: [PATCH]: Re: next surprise References: Message-ID: <20000402154323.A1898@lucon.org> On Sat, Apr 01, 2000 at 03:33:31PM -0700, Ulrich Drepper wrote: > The next thing in the standard draft which causes problems is that the > getnetbyaddr function takes an uint32_t value for the first parameter. > We currently use unsigned long (why?). This is not much of a problem > but we are also using unsigned long in the struct netent definition. > > I've committed some changes to remove this difference from the > standard. On 32 bit platforms we should have no problems. On 64 bit > platforms the struct netent definition should be changed. I've > currently only created a Linux/Alpha version as I don't think breaking > the other 64 bit APIs is a problem (SPARC64, MIPS64, IA-64). > > IA-64 people: note that this is an incmopatible change if you are > using a glibc 2.1 based version. There will be more of these changes > and I've warned everybody in advance. > IA-64 should be ok since we expect ABI will be changed in 2.2 and we use libc.so.0, libm.so.0 and ld-linux-is64.so.1. Everyone is warned about it. However, I'd like reserve a bit in ld.so cache for ia64. Here is the patch. H.J. ---- 2000-04-02 H.J. Lu * elf/ldconfig.h (FLAG_IA64_LIB64): New. Defined. Index: elf/ldconfig.h =================================================================== RCS file: /cvs/glibc/libc/elf/ldconfig.h,v retrieving revision 1.1 diff -u -p -r1.1 ldconfig.h --- ldconfig.h 1999/12/04 07:57:55 1.1 +++ ldconfig.h 2000/04/02 22:39:08 @@ -28,6 +28,7 @@ #define FLAG_ELF_LIBC6 0x0003 #define FLAG_REQUIRED_MASK 0xff00 #define FLAG_SPARC_LIB64 0x0100 +#define FLAG_IA64_LIB64 0x0200 /* Declared in cache.c. */ extern void print_cache (const char *cache_name); From drepper@redhat.com Sun Apr 2 21:15:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Sun, 02 Apr 2000 21:15:00 -0000 Subject: relocation dependencies Message-ID: I've checked in patches to fix ld.so to handle the case for which I checked in a test yesterday. ld.so now tracks dependencies introduced by relocations. Example: main dlopen()s with RTLD_GLOBAL liba libb liba defines foo libb defines bar bar in libb needs foo If now the main program calls bar in libb the reference to foo gets resolved with the foo in liba. Formerly, if now liba gets unloaded, following calls to bar leads to a segfault since the jump to foo ends in nirvana. Now liba does not actually get removed until libb also gets removed. To see it actually works run the test case in dlfcn with LD_DEBUG=files. Fortunately I didn't have to change much. Most of the work was done when I added the debug messages quite some time back. We also can avoid the expensive work to add the dependency by some cheap tests so that the overall penalties of introducing this feature are very low. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Mon Apr 3 00:16:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 03 Apr 2000 00:16:00 -0000 Subject: strfry References: <200003311108.NAA02733@hawking.suse.de> Message-ID: Andreas Schwab writes: > strfry didn't use initstate_r correctly. Thanks, I've applied the patch. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From jaeger@informatik.uni-kl.de Mon Apr 3 15:13:00 2000 From: jaeger@informatik.uni-kl.de (jaeger@informatik.uni-kl.de) Date: Mon, 03 Apr 2000 15:13:00 -0000 Subject: shlib-compat and PIC patches Message-ID: <200004040013.aa02517@okarina.informatik.uni-kl.de> I've used the shlib-compat macros in a couple of more files (the old macros are used now only in the files) and fixed also some places which used PIC to use the right defines (SHARED or __PIC__). A patch is appended. Andreas For linuxthreads: 2000-04-01 Andreas Jaeger * attr.c: Use shlib-compat macros. * oldsemaphore.c: Likewise. * pthread.c: Likewise. * weaks.c: Likewise. 2000-04-01 Andreas Jaeger * sysdeps/mach/hurd/mips/init-first.c: Use SHARED instead of PIC. * sysdeps/unix/mips/sysdep.h: Use __PIC__ instead of PIC. * sysdeps/mach/mips/thread_state.h: Likewise. * sysdeps/generic/fclrexcpt.c: Use shlib-compat macros. * sysdeps/generic/fegetenv.c: Likewise. * sysdeps/generic/fesetenv.c: Likewise. * sysdeps/generic/feupdateenv.c: Likewise. * sysdeps/generic/fraiseexcpt.c: Likewise. * sysdeps/generic/fsetexcptflg.c: Likewise. * sysdeps/unix/sysv/linux/alpha/glob.c: Likewise. * sysdeps/unix/sysv/linux/arm/errlist.c: Likewise. * sysdeps/unix/sysv/linux/errlist.c: Likewise. * sysdeps/unix/sysv/linux/i386/chown.c: Likewise. ============================================================ Index: sysdeps/mach/hurd/mips/init-first.c --- sysdeps/mach/hurd/mips/init-first.c 1998/06/29 12:43:07 1.3 +++ sysdeps/mach/hurd/mips/init-first.c 2000/04/03 22:01:24 @@ -1,5 +1,5 @@ /* Initialization code run first thing by the ELF startup code. For Mips/Hurd. - Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 2000 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 @@ -109,7 +109,7 @@ /* This is a hack to make the special getopt in GNU libc working. */ __getopt_clean_environment (envp); -#ifdef PIC +#ifdef SHARED __libc_global_ctors (); #endif @@ -175,7 +175,7 @@ (void) &__init; } -#ifdef PIC +#ifdef SHARED /* This function is called to initialize the shared C library. It is called just before the user _start code from mips/elf/start.S, with the stack set up as that code gets it. */ @@ -274,7 +274,7 @@ } #endif -#ifndef PIC +#ifndef SHARED /* An assembler code wrapping c function __init. */ #ifdef __mips64 asm ("\ ============================================================ Index: sysdeps/unix/mips/sysdep.h --- sysdeps/unix/mips/sysdep.h 1999/08/24 20:59:51 1.7 +++ sysdeps/unix/mips/sysdep.h 2000/04/03 22:01:24 @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1997, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1992,95,97,99,2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -32,7 +32,7 @@ /* Note that while it's better structurally, going back to call __syscall_error can make things confusing if you're debugging---it looks like it's jumping backwards into the previous fn. */ -#ifdef PIC +#ifdef __PIC__ #define PSEUDO(name, syscall_name, args) \ .align 2; \ 99: la t9,__syscall_error; \ ============================================================ Index: sysdeps/mach/mips/thread_state.h --- sysdeps/mach/mips/thread_state.h 1998/09/23 16:34:46 1.7 +++ sysdeps/mach/mips/thread_state.h 2000/04/03 22:01:24 @@ -1,5 +1,5 @@ /* Mach thread state definitions for machine-independent code. MIPS version. - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000 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 @@ -20,7 +20,7 @@ #define MACHINE_THREAD_STATE_FLAVOR MIPS_THREAD_STATE #define MACHINE_THREAD_STATE_COUNT MIPS_THREAD_STATE_COUNT -#ifdef PIC +#ifdef __PIC__ #define MACHINE_THREAD_STATE_SET_PC(ts, pc) \ ((ts)->PC = (ts)->r25 = (unsigned long int) (pc)) #endif ============================================================ Index: sysdeps/generic/fclrexcpt.c --- sysdeps/generic/fclrexcpt.c 2000/02/26 01:09:38 1.3 +++ sysdeps/generic/fclrexcpt.c 2000/04/03 22:01:24 @@ -19,6 +19,7 @@ Boston, MA 02111-1307, USA. */ #include +#include int __feclearexcept (int excepts) @@ -26,9 +27,11 @@ /* This always fails. */ return 1; } +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__feclearexcept, __old_feclearexcept) -symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1); -default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.2); +compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1); +#endif +versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2); stub_warning (feclearexcept) #include ============================================================ Index: sysdeps/generic/fegetenv.c --- sysdeps/generic/fegetenv.c 2000/02/26 01:09:38 1.3 +++ sysdeps/generic/fegetenv.c 2000/04/03 22:01:24 @@ -19,6 +19,7 @@ Boston, MA 02111-1307, USA. */ #include +#include int fegetenv (fenv_t *envp) @@ -26,9 +27,11 @@ /* This always fails. */ return 1; } +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fegetenv, __old_fegetenv) -symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1); -default_symbol_version (__fegetenv, fegetenv, GLIBC_2.2); +compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1); +#endif +versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2); stub_warning (fegetenv) #include ============================================================ Index: sysdeps/generic/fesetenv.c --- sysdeps/generic/fesetenv.c 2000/02/26 01:09:38 1.3 +++ sysdeps/generic/fesetenv.c 2000/04/03 22:01:24 @@ -19,6 +19,7 @@ Boston, MA 02111-1307, USA. */ #include +#include int __fesetenv (const fenv_t *envp) @@ -26,9 +27,11 @@ /* This always fails. */ return 1; } +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fesetenv, __old_fesetenv) -symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1); -default_symbol_version (__fesetenv, fesetenv, GLIBC_2.2); +compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); +#endif +versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); stub_warning (fesetenv) #include ============================================================ Index: sysdeps/generic/feupdateenv.c --- sysdeps/generic/feupdateenv.c 2000/02/26 01:09:38 1.3 +++ sysdeps/generic/feupdateenv.c 2000/04/03 22:01:24 @@ -19,6 +19,7 @@ Boston, MA 02111-1307, USA. */ #include +#include int __feupdateenv (const fenv_t *envp) @@ -26,9 +27,11 @@ /* This always fails. */ return 1; } +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__feupdateenv, __old_feupdateenv) -symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1); -default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.2); +compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1); +#endif +versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2); stub_warning (feupdateenv) #include ============================================================ Index: sysdeps/generic/fgetexcptflg.c --- sysdeps/generic/fgetexcptflg.c 2000/02/26 01:09:38 1.3 +++ sysdeps/generic/fgetexcptflg.c 2000/04/03 22:01:24 @@ -19,6 +19,7 @@ Boston, MA 02111-1307, USA. */ #include +#include int __fegetexceptflag (fexcept_t *flagp, int excepts) @@ -26,9 +27,11 @@ /* This always fails. */ return 1; } +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fegetexceptflag, __old_fegetexceptflag) -symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1); -default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.2); +compat_symbol (libm, __old_fegetexceptflag, fegetexceptflag, GLIBC_2_1); +#endif +versioned_symbol (libm, __fegetexceptflag, fegetexceptflag, GLIBC_2_2); stub_warning (fegetexceptflag) #include ============================================================ Index: sysdeps/generic/fraiseexcpt.c --- sysdeps/generic/fraiseexcpt.c 2000/02/26 01:09:38 1.3 +++ sysdeps/generic/fraiseexcpt.c 2000/04/03 22:01:24 @@ -19,6 +19,7 @@ Boston, MA 02111-1307, USA. */ #include +#include int __feraiseexcept (int excepts) @@ -26,9 +27,11 @@ /* This always fails. */ return 1; } +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__feraiseexcept, __old_feraiseexcept) -symbol_version (__old_feraiseexcept, feraiseexcept, GLIBC_2.1); -default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.2); +compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1); +#endif +versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2); stub_warning (feraiseexcept) #include ============================================================ Index: sysdeps/generic/fsetexcptflg.c --- sysdeps/generic/fsetexcptflg.c 2000/02/26 01:09:38 1.3 +++ sysdeps/generic/fsetexcptflg.c 2000/04/03 22:01:24 @@ -19,6 +19,7 @@ Boston, MA 02111-1307, USA. */ #include +#include int __fesetexceptflag (const fexcept_t *flagp, int excepts) @@ -26,9 +27,11 @@ /* This always fails. */ return 1; } +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fesetexceptflag, __old_fesetexceptflag) -symbol_version (__old_fesetexceptflag, fesetexceptflag, GLIBC_2.1); -default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.2); +compat_symbol (libm, __old_fesetexceptflag, fesetexceptflag, GLIBC_2_1); +#endif +versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2); stub_warning (fesetexceptflag) #include ============================================================ Index: sysdeps/unix/sysv/linux/alpha/glob.c --- sysdeps/unix/sysv/linux/alpha/glob.c 1998/08/12 17:06:03 1.7 +++ sysdeps/unix/sysv/linux/alpha/glob.c 2000/04/03 22:01:24 @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000 Free Software Foundation, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as @@ -20,6 +20,7 @@ #include #include +#include /* For Linux/Alpha we have to make the glob symbols versioned. */ #define glob(pattern, flags, errfunc, pglob) \ @@ -40,8 +41,8 @@ #undef glob64 #undef globfree64 -default_symbol_version(__new_glob, glob, GLIBC_2.1); -default_symbol_version(__new_globfree, globfree, GLIBC_2.1); +versioned_symbol (libc, __new_glob, glob, GLIBC_2_1); +versioned_symbol (libc, __new_globfree, globfree, GLIBC_2_1); weak_alias (__new_glob, glob64) weak_alias (__new_globfree, globfree64) ============================================================ Index: sysdeps/unix/sysv/linux/arm/errlist.c --- sysdeps/unix/sysv/linux/arm/errlist.c 2000/03/31 05:39:18 1.2 +++ sysdeps/unix/sysv/linux/arm/errlist.c 2000/04/03 22:01:24 @@ -39,11 +39,11 @@ strong_alias (__old_sys_nerr, _old_sys_nerr); weak_alias (__old_sys_nerr, _old_sys_nerr) -symbol_version (__old_sys_nerr, _sys_nerr, GLIBC_2.0); -symbol_version (_old_sys_nerr, sys_nerr, GLIBC_2.0); +compat_symbol (libc, __old_sys_nerr, _sys_nerr, GLIBC_2_0); +compat_symbol (libc, _old_sys_nerr, sys_nerr, GLIBC_2_0); weak_alias (__old_sys_errlist, _old_sys_errlist); -symbol_version (__old_sys_errlist, _sys_errlist, GLIBC_2.0); -symbol_version (_old_sys_errlist, sys_errlist, GLIBC_2.0); +compat_symbol (libc, __old_sys_errlist, _sys_errlist, GLIBC_2_0); +compat_symbol (libc, _old_sys_errlist, sys_errlist, GLIBC_2_0); #endif strong_alias (__new_sys_nerr, _new_sys_nerr) ============================================================ Index: sysdeps/unix/sysv/linux/errlist.c --- sysdeps/unix/sysv/linux/errlist.c 2000/03/22 07:59:25 1.5 +++ sysdeps/unix/sysv/linux/errlist.c 2000/04/03 22:01:24 @@ -39,11 +39,11 @@ strong_alias (__old_sys_nerr, _old_sys_nerr); weak_alias (__old_sys_nerr, _old_sys_nerr) -symbol_version (__old_sys_nerr, _sys_nerr, GLIBC_2.0); -symbol_version (_old_sys_nerr, sys_nerr, GLIBC_2.0); +compat_symbol (libc, __old_sys_nerr, _sys_nerr, GLIBC_2_0); +compat_symbol (libc, _old_sys_nerr, sys_nerr, GLIBC_2_0); weak_alias (__old_sys_errlist, _old_sys_errlist); -symbol_version (__old_sys_errlist, _sys_errlist, GLIBC_2.0); -symbol_version (_old_sys_errlist, sys_errlist, GLIBC_2.0); +compat_symbol (libc, __old_sys_errlist, _sys_errlist, GLIBC_2_0); +compat_symbol (libc, _old_sys_errlist, sys_errlist, GLIBC_2_0); #endif strong_alias (__new_sys_nerr, _new_sys_nerr) ============================================================ Index: sysdeps/unix/sysv/linux/i386/chown.c --- sysdeps/unix/sysv/linux/i386/chown.c 2000/03/31 05:44:27 1.10 +++ sysdeps/unix/sysv/linux/i386/chown.c 2000/04/03 22:01:24 @@ -24,9 +24,9 @@ #include #include +#include - /* In Linux 2.1.x the chown functions have been changed. A new function lchown was introduced. The new chown now follows symlinks - the old chown and the @@ -132,7 +132,7 @@ { return INLINE_SYSCALL (chown, 3, file, owner, group); } -#elif defined HAVE_ELF && defined SHARED && defined DO_VERSIONING +#elif SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) /* Compiling for compatibiity. */ int __chown_is_lchown (const char *file, uid_t owner, gid_t group) @@ -141,20 +141,20 @@ } #endif -#if defined HAVE_ELF && defined SHARED && defined DO_VERSIONING +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) strong_alias (__chown_is_lchown, _chown_is_lchown) -symbol_version (__chown_is_lchown, __chown, GLIBC_2.0); -symbol_version (_chown_is_lchown, chown, GLIBC_2.0); +compat_symbol (libc, __chown_is_lchown, __chown, GLIBC_2_0); +compat_symbol (libc, _chown_is_lchown, chown, GLIBC_2_0); # ifdef __NR_lchown strong_alias (__real_chown, _real_chown) -default_symbol_version (__real_chown, __chown, GLIBC_2.1); -default_symbol_version (_real_chown, chown, GLIBC_2.1); +versioned_symbol (libc, __real_chown, __chown, GLIBC_2_1); +versioned_symbol (libc, _real_chown, chown, GLIBC_2_1); # else strong_alias (__chown_is_lchown, __chown_is_lchown21) strong_alias (__chown_is_lchown, _chown_is_lchown21) -default_symbol_version (__chown_is_lchown21, __chown, GLIBC_2.1); -default_symbol_version (_chown_is_lchown21, chown, GLIBC_2.1); +versioned_symbol (libc, __chown_is_lchown21, __chown, GLIBC_2_1); +versioned_symbol (libc, _chown_is_lchown21, chown, GLIBC_2_1); # endif #else # ifdef __NR_lchown ============================================================ Index: linuxthreads/attr.c --- linuxthreads/attr.c 2000/03/22 07:35:44 1.10 +++ linuxthreads/attr.c 2000/04/03 22:01:24 @@ -51,7 +51,8 @@ attr->__scope = PTHREAD_SCOPE_SYSTEM; return 0; } -symbol_version (__pthread_attr_init_2_0, pthread_attr_init, GLIBC_2.0); +compat_symbol (libpthread, __pthread_attr_init_2_0, pthread_attr_init, + GLIBC_2_0); #endif int pthread_attr_destroy(pthread_attr_t *attr) ============================================================ Index: linuxthreads/oldsemaphore.c --- linuxthreads/oldsemaphore.c 2000/03/22 07:35:44 1.5 +++ linuxthreads/oldsemaphore.c 2000/04/03 22:01:24 @@ -226,11 +226,11 @@ } } -symbol_version (__old_sem_init, sem_init, GLIBC_2.0); -symbol_version (__old_sem_wait, sem_wait, GLIBC_2.0); -symbol_version (__old_sem_trywait, sem_trywait, GLIBC_2.0); -symbol_version (__old_sem_post, sem_post, GLIBC_2.0); -symbol_version (__old_sem_getvalue, sem_getvalue, GLIBC_2.0); -symbol_version (__old_sem_destroy, sem_destroy, GLIBC_2.0); +compat_symbol (libpthread, __old_sem_init, sem_init, GLIBC_2_0); +compat_symbol (libpthread, __old_sem_wait, sem_wait, GLIBC_2_0); +compat_symbol (libpthread, __old_sem_trywait, sem_trywait, GLIBC_2_0); +compat_symbol (libpthread, __old_sem_post, sem_post, GLIBC_2_0); +compat_symbol (libpthread, __old_sem_getvalue, sem_getvalue, GLIBC_2_0); +compat_symbol (libpthread, __old_sem_destroy, sem_destroy, GLIBC_2_0); #endif ============================================================ Index: linuxthreads/pthread.c --- linuxthreads/pthread.c 2000/03/31 05:44:26 1.39 +++ linuxthreads/pthread.c 2000/04/03 22:01:24 @@ -541,7 +541,7 @@ } return __pthread_create_2_1 (thread, attr, start_routine, arg); } -symbol_version (__pthread_create_2_0, pthread_create, GLIBC_2.0); +compat_symbol (libpthread, __pthread_create_2_0, pthread_create, GLIBC_2_0); #endif /* Simple operations on thread identifiers */ ============================================================ Index: linuxthreads/weaks.c --- linuxthreads/weaks.c 2000/03/22 07:35:44 1.7 +++ linuxthreads/weaks.c 2000/04/03 22:01:25 @@ -32,7 +32,8 @@ GLIBC_2_1); #if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1) weak_alias (__pthread_return_0, __libc_pthread_attr_init_2_0) -symbol_version (__libc_pthread_attr_init_2_, pthread_attr_init, GLIBC_2.0); +compat_symbol (libpthread, __libc_pthread_attr_init_2_, pthread_attr_init, + GLIBC_2_0); #endif weak_alias (__pthread_return_0, pthread_attr_destroy) weak_alias (__pthread_return_0, pthread_attr_setdetachstate) -- Andreas Jaeger SuSE Labs aj@suse.de From jaeger@informatik.uni-kl.de Mon Apr 3 15:49:00 2000 From: jaeger@informatik.uni-kl.de (jaeger@informatik.uni-kl.de) Date: Mon, 03 Apr 2000 15:49:00 -0000 Subject: Patch: __inet_aton prototype Message-ID: With the current CVS version of glibc I get these new warnings: inet_addr.c:83: warning: implicit declaration of function `__inet_aton' inet_addr.c:97: warning: type mismatch with previous implicit declaration inet_addr.c:83: warning: previous implicit declaration of `__inet_aton' inet_addr.c:97: warning: `__inet_aton'was previously implicitly declared to return ????nt' A patch is appended. Andreas 2000-04-03 Andreas Jaeger * include/arpa/inet.h (__inet_aton): Add protoype. ============================================================ Index: include/arpa/inet.h --- include/arpa/inet.h 1997/06/21 01:19:08 1.1 +++ include/arpa/inet.h 2000/04/03 22:43:28 @@ -1 +1,3 @@ #include + +extern in_addr_t __inet_aton (__const char *__cp, struct in_addr *__inp); -- Andreas Jaeger SuSE Labs aj@suse.de From hjl@valinux.com Mon Apr 3 16:21:00 2000 From: hjl@valinux.com (H . J . Lu) Date: Mon, 03 Apr 2000 16:21:00 -0000 Subject: binutils 2.9.5.0.33 is released Message-ID: <20000403161653.A13196@valinux.com> This is the beta release of binutils 2.9.5.0.33 for Linux, which is based on binutils 2000 0403 plus various changes. It is purely for Linux, although it has been tested on Solaris/Sparc and Solaris/x86 from time to time. I am planning to make the public release soon. Please test it as much as you can. Please report any bugs related to binutils 2.9.5.0.33 to hjl@lucon.org. For arm-linux targets, there are some important differences in behaviour between these tools and binutils 2.9.1.0.x. The linker emulation name has changed from elf32arm{26} to armelf_linux{26}. Also, the "-p" flag must be passed with the linker when working with object files (or static libraries) created using older versions of the assembler. If this flag is omitted the linker will silently generate bad output when given old input files. To get the correct behaviour from gcc, amend the *link section of your specs file as follows: *link: %{h*} %{version:-v} %{b} %{Wl,*:%*} %{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} %{rdynamic:-export-dynamic} %{!dynamic-linker: -dynamic-linker /lib/ld-linux.so.2} -X %{mbig-endian:-EB} %{mapcs-26:-m armelf_linux26} %{!mapcs-26:-m armelf_linux} -p Changes from binutils 2.9.5.0.32: 1. Update from binutils 2000 0403. Fix the 16bit ia32 assembler bug. Changes from binutils 2.9.5.0.31: 1. Update from binutils 2000 0331. Fix the Linux/ARM assembler bug. 2. Fix a Debian assembler security bug. Changes from binutils 2.9.5.0.29: 1. Update from binutils 2000 0319. 2. An ELF/alpha bug is fixed. Changes from binutils 2.9.5.0.27: 1. Update from binutils 2000 0301. 2. A demangler bug is fixed. 3. A better fix for undefined symbols with -Bsymbolic when building shared library. Changes from binutils 2.9.5.0.24: 1. Update from binutils 2000 0204. 2. Added -taso to linker on alpha. 3. Fixed a -shared -Bsymbolic bug when PIC is not used. Changes from binutils 2.9.5.0.22: 1. Update from binutils 2000 0113. 2. A symbol version bug is fixed. 3. A -Bsymbolic bug is fixed. Changes from binutils 2.9.5.0.21: 1. Update from binutils 1999 1202. 2. Remove a MIPS/ELF change. 3. Enable SOM for HPPA. Changes from binutils 2.9.5.0.19: 1. Update from binutils 1999 1122. An ia32 gas bug is fixed. Changes from binutils 2.9.5.0.16: 1. Update from binutils 1999 1104. 2. i370 is changed to use EM_S370 and ELFOSABI_LINUX. Update readelf. 3. Fix Compaq's demangler support. Changes from binutils 2.9.5.0.14: 1. Update from binutils 1999 1012. A gas bug which affects Linux 2.3.21 is fixed. 2. i370 update. 3. The new demangler code. You should use "--style=xxx" to select the demnangle style instead of "--lang=xxx". Changes from binutils 2.9.5.0.13: 1. Update from binutils 1999 0925. 2. Fix a -s and linker script bug. Changes from binutils 2.9.5.0.12: 1. Update from binutils 1999 0922. 2. i370 update. Changes from binutils 2.9.5.0.11: 1. Update from binutils 1999 0910. It fixed a PIC linker bug on ix86 and sparc introduced in the last release. 2. i370 update. Changes from binutils 2.9.5.0.10: 1. Update from binutils 1999 0906. It fixed a PIC linker bug on ix86 and sparc. 2. Remove elf/hppa since it is WIP. Changes from binutils 2.9.5.0.8: 1. Update from binutils 1999 0831. It allows spaces around '(' and ')' in x86 FP register names. Changes from binutils 2.9.5.0.7: 1. Update from binutils 1999 0821. 2. Some MIPS changes. Changes from binutils 2.9.5.0.6: 1. Update from binutils 1999 0813. 2. i370 update. Changes from binutils 2.9.5.0.5: 1. Update from binutils 1999 0809. An ELF/Sparc ld bug is fixed. Changes from binutils 2.9.5.0.4: 1. Update from binutils 1999 0806. A Solaris/Sparc gas bug is fixed. 2. Remove mips gas patches from binutils 2.9.1.0.25. Changes from binutils 2.9.5.0.3: 1. Update from binutils 1999 0801. 2. Support for real mode x86 gcc. Changes from binutils 2.9.4.0.8: 1. Update from binutils 1999 0719. A libc 5 related bug fix. 2. Fix a typo in mips gas. Changes from binutils 2.9.4.0.7: 1. Update from binutils 1999 0710. A weak symbol bug http://egcs.cygnus.com/ml/egcs-bugs/1999-07/msg00129.html is fixed. Changes from binutils 2.9.4.0.6: 1. Update from binutils 1999 0626. Changes from binutils 2.9.4.0.5: 1. Update from binutils 1999 0620. 2. Remove my fwait fix and use the one in cvs. 3. Use "--only-section=section" instead of "--extract-section=section". for objcopy. Changes from binutils 2.9.4.0.4: 1. Update from binutils 1999 0612. 2. Remove various temporary fixes of mine since those bugs are fixed now. Changes from binutils 2.9.4.0.3: 1. Update from binutils 1999 0611. 2. Remove my ELF/Alpha bfd changes. 3. Use the local symbol copy fix in binutils 1999 0611. Changes from binutils 2.9.4.0.2: 1. Update from binutils 1999 0607. 2. Remove my Sparc hacks. 3. Fix local symbol copy. Changes from binutils 2.9.4.0.1: 1. Update from binutils 1999 0606. 2. Restore relocation overflow checking in binutils 2.9.1.0.25 so that Linux kernel can build. 3. Fix i370 for the new gas. Changes from binutils 1999 0605: 1. Fix a -Bsymbolic bug for Linux/alpha. 2. Add ELF/i370. 3. Fix 8/16-bit relocations for i386. 4. Add --redefine-sym=old_form=new_form to objcopy. 5. Add "-j section" for objcopy. 6. Fix i386 disassembler for fwait. 7. Fix a Sparc asm bug. 8. Add Ada demangle support. 9. Fix MIPS/ELF bugs. 10. Add some vxworks suppport. 11. Fix a.out assembler. The file list: 1. binutils-2.9.5.0.33.tar.gz. Source code. 2. binutils-2.9.5.0.32-2.9.5.0.33.diff.gz. Patch against the previous beta source code. 3. binutils-2.9.5.0.33-1.i386.rpm. IA-32 binary RPM for RedHat 6.1. There is no separate source rpm. You can do # rpm -ta binutils-2.9.5.0.33.tar.gz to create both binary and source rpms. The primary ftp sites for the beta Linux binutils are: 1. ftp://ftp.valinux.com/pub/support/hjl/binutils Thanks. H.J. Lu hjl@lucon.org 04/03/2000 From drepper@redhat.com Mon Apr 3 22:28:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 03 Apr 2000 22:28:00 -0000 Subject: [PATCH]: Re: next surprise References: <20000402154323.A1898@lucon.org> Message-ID: "H . J . Lu" writes: > However, I'd like reserve a bit in ld.so cache for ia64. Here is > the patch. Applied. Thanks, -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From schwab@suse.de Tue Apr 4 04:19:00 2000 From: schwab@suse.de (Andreas Schwab) Date: Tue, 04 Apr 2000 04:19:00 -0000 Subject: big5.c typo Message-ID: <200004041119.NAA27330@hawking.suse.de> This fixes a typo. Andreas. 2000-04-04 Andreas Schwab * iconvdata/big5.c (BODY): Fix typo. Index: big5.c =================================================================== RCS file: /cvs/glibc/libc/iconvdata/big5.c,v retrieving revision 1.8 diff -u -a -u -r1.8 iconvdata/big5.c --- iconvdata/big5.c 2000/03/28 17:27:37 1.8 +++ iconvdata/big5.c 2000/04/04 11:18:06 @@ -8475,7 +8475,7 @@ else \ ++inptr; \ \ - putr32 (outptr, ch); \ + put32 (outptr, ch); \ outptr += 4; \ } #include -- Andreas Schwab "And now for something SuSE Labs completely different." Andreas.Schwab@suse.de SuSE GmbH, Schanz????ckerstr. 10, D-90443 N????rnberg From schwab@suse.de Tue Apr 4 07:38:00 2000 From: schwab@suse.de (Andreas Schwab) Date: Tue, 04 Apr 2000 07:38:00 -0000 Subject: ldconfig Message-ID: <200004041438.QAA09681@hawking.suse.de> This is a patch for ldconfig, so that you don't get "unknown" when printing the cache and the entry contains some flags in addition to the type (FLAG_SPARC_LIB64 or FLAG_IA64_LIB64). Andreas. 2000-04-04 Andreas Schwab * elf/cache.c (print_entry): Only look at the type field when printing the type. Index: cache.c =================================================================== RCS file: /cvs/glibc/libc/elf/cache.c,v retrieving revision 1.1 diff -u -a -u -r1.1 cache.c --- cache.c 1999/12/04 07:57:26 1.1 +++ cache.c 2000/04/04 14:27:00 @@ -72,7 +72,7 @@ print_entry (const char *lib, int flag, const char *key) { printf ("\t%s (", lib); - switch (flag) + switch (flag & FLAG_TYPE_MASK) { case FLAG_LIBC4: case FLAG_ELF: -- Andreas Schwab "And now for something SuSE Labs completely different." Andreas.Schwab@suse.de SuSE GmbH, Schanz????ckerstr. 10, D-90443 N????rnberg From hjl@valinux.com Tue Apr 4 11:17:00 2000 From: hjl@valinux.com (H . J . Lu) Date: Tue, 04 Apr 2000 11:17:00 -0000 Subject: Binutils 2.9.5.0.34 is released. Message-ID: <20000404111418.A19985@valinux.com> This is the beta release of binutils 2.9.5.0.34 for Linux, which is based on binutils 2000 0403 plus various changes. It is purely for Linux, although it has been tested on Solaris/Sparc and Solaris/x86 from time to time. I am planning to make the public release soon. Please test it as much as you can. Please report any bugs related to binutils 2.9.5.0.34 to hjl@lucon.org. For arm-linux targets, there are some important differences in behaviour between these tools and binutils 2.9.1.0.x. The linker emulation name has changed from elf32arm{26} to armelf_linux{26}. Also, the "-p" flag must be passed with the linker when working with object files (or static libraries) created using older versions of the assembler. If this flag is omitted the linker will silently generate bad output when given old input files. To get the correct behaviour from gcc, amend the *link section of your specs file as follows: *link: %{h*} %{version:-v} %{b} %{Wl,*:%*} %{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} %{rdynamic:-export-dynamic} %{!dynamic-linker: -dynamic-linker /lib/ld-linux.so.2} -X %{mbig-endian:-EB} %{mapcs-26:-m armelf_linux26} %{!mapcs-26:-m armelf_linux} -p Changes from binutils 2.9.5.0.33: 1. Update from binutils 2000 0404. Fix the bug report bug. Changes from binutils 2.9.5.0.32: 1. Update from binutils 2000 0403. Fix the 16bit ia32 assembler bug. Changes from binutils 2.9.5.0.31: 1. Update from binutils 2000 0331. Fix the Linux/ARM assembler bug. 2. Fix a Debian assembler security bug. Changes from binutils 2.9.5.0.29: 1. Update from binutils 2000 0319. 2. An ELF/alpha bug is fixed. Changes from binutils 2.9.5.0.27: 1. Update from binutils 2000 0301. 2. A demangler bug is fixed. 3. A better fix for undefined symbols with -Bsymbolic when building shared library. Changes from binutils 2.9.5.0.24: 1. Update from binutils 2000 0204. 2. Added -taso to linker on alpha. 3. Fixed a -shared -Bsymbolic bug when PIC is not used. Changes from binutils 2.9.5.0.22: 1. Update from binutils 2000 0113. 2. A symbol version bug is fixed. 3. A -Bsymbolic bug is fixed. Changes from binutils 2.9.5.0.21: 1. Update from binutils 1999 1202. 2. Remove a MIPS/ELF change. 3. Enable SOM for HPPA. Changes from binutils 2.9.5.0.19: 1. Update from binutils 1999 1122. An ia32 gas bug is fixed. Changes from binutils 2.9.5.0.16: 1. Update from binutils 1999 1104. 2. i370 is changed to use EM_S370 and ELFOSABI_LINUX. Update readelf. 3. Fix Compaq's demangler support. Changes from binutils 2.9.5.0.14: 1. Update from binutils 1999 1012. A gas bug which affects Linux 2.3.21 is fixed. 2. i370 update. 3. The new demangler code. You should use "--style=xxx" to select the demnangle style instead of "--lang=xxx". Changes from binutils 2.9.5.0.13: 1. Update from binutils 1999 0925. 2. Fix a -s and linker script bug. Changes from binutils 2.9.5.0.12: 1. Update from binutils 1999 0922. 2. i370 update. Changes from binutils 2.9.5.0.11: 1. Update from binutils 1999 0910. It fixed a PIC linker bug on ix86 and sparc introduced in the last release. 2. i370 update. Changes from binutils 2.9.5.0.10: 1. Update from binutils 1999 0906. It fixed a PIC linker bug on ix86 and sparc. 2. Remove elf/hppa since it is WIP. Changes from binutils 2.9.5.0.8: 1. Update from binutils 1999 0831. It allows spaces around '(' and ')' in x86 FP register names. Changes from binutils 2.9.5.0.7: 1. Update from binutils 1999 0821. 2. Some MIPS changes. Changes from binutils 2.9.5.0.6: 1. Update from binutils 1999 0813. 2. i370 update. Changes from binutils 2.9.5.0.5: 1. Update from binutils 1999 0809. An ELF/Sparc ld bug is fixed. Changes from binutils 2.9.5.0.4: 1. Update from binutils 1999 0806. A Solaris/Sparc gas bug is fixed. 2. Remove mips gas patches from binutils 2.9.1.0.25. Changes from binutils 2.9.5.0.3: 1. Update from binutils 1999 0801. 2. Support for real mode x86 gcc. Changes from binutils 2.9.4.0.8: 1. Update from binutils 1999 0719. A libc 5 related bug fix. 2. Fix a typo in mips gas. Changes from binutils 2.9.4.0.7: 1. Update from binutils 1999 0710. A weak symbol bug http://egcs.cygnus.com/ml/egcs-bugs/1999-07/msg00129.html is fixed. Changes from binutils 2.9.4.0.6: 1. Update from binutils 1999 0626. Changes from binutils 2.9.4.0.5: 1. Update from binutils 1999 0620. 2. Remove my fwait fix and use the one in cvs. 3. Use "--only-section=section" instead of "--extract-section=section". for objcopy. Changes from binutils 2.9.4.0.4: 1. Update from binutils 1999 0612. 2. Remove various temporary fixes of mine since those bugs are fixed now. Changes from binutils 2.9.4.0.3: 1. Update from binutils 1999 0611. 2. Remove my ELF/Alpha bfd changes. 3. Use the local symbol copy fix in binutils 1999 0611. Changes from binutils 2.9.4.0.2: 1. Update from binutils 1999 0607. 2. Remove my Sparc hacks. 3. Fix local symbol copy. Changes from binutils 2.9.4.0.1: 1. Update from binutils 1999 0606. 2. Restore relocation overflow checking in binutils 2.9.1.0.25 so that Linux kernel can build. 3. Fix i370 for the new gas. Changes from binutils 1999 0605: 1. Fix a -Bsymbolic bug for Linux/alpha. 2. Add ELF/i370. 3. Fix 8/16-bit relocations for i386. 4. Add --redefine-sym=old_form=new_form to objcopy. 5. Add "-j section" for objcopy. 6. Fix i386 disassembler for fwait. 7. Fix a Sparc asm bug. 8. Add Ada demangle support. 9. Fix MIPS/ELF bugs. 10. Add some vxworks suppport. 11. Fix a.out assembler. The file list: 1. binutils-2.9.5.0.34.tar.gz. Source code. 2. binutils-2.9.5.0.33-2.9.5.0.34.diff.gz. Patch against the previous beta source code. 3. binutils-2.9.5.0.34-1.i386.rpm. IA-32 binary RPM for RedHat 6.1. There is no separate source rpm. You can do # rpm -ta binutils-2.9.5.0.34.tar.gz to create both binary and source rpms. The primary ftp sites for the beta Linux binutils are: 1. ftp://ftp.valinux.com/pub/support/hjl/binutils Thanks. H.J. Lu hjl@lucon.org 04/04/2000 From jaeger@informatik.uni-kl.de Tue Apr 4 13:51:00 2000 From: jaeger@informatik.uni-kl.de (jaeger@informatik.uni-kl.de) Date: Tue, 04 Apr 2000 13:51:00 -0000 Subject: error in utf-16.c Message-ID: <200004042250.aa02283@okarina.informatik.uni-kl.de> Compiling for MIPS/Linux I receive this error message: ../iconv/skeleton.c: In function `gconv': In file included from utf-16.c:347: ../iconv/skeleton.c:310: `dir' undeclared (first use in this function) ../iconv/skeleton.c:310: (Each undeclared identifier is reported only once ../iconv/skeleton.c:310: for each function it appears in.) make[2]: *** [/home/aj/build-glibc-mips/iconvdata/utf-16.os] Error 1 The problem is that PREPARE_LOOP declares a variable dir which is used in FROM_DIRECTION - but FROM_DIRECTION is used first in skeleton.c. I couldn't find a direct way to fix this without breaking other things:-(. Andreas -- Andreas Jaeger SuSE Labs aj@suse.de From drepper@redhat.com Tue Apr 4 13:53:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 04 Apr 2000 13:53:00 -0000 Subject: big5.c typo References: <200004041119.NAA27330@hawking.suse.de> Message-ID: Andreas Schwab writes: > This fixes a typo. Applied. Thanks, -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Tue Apr 4 13:55:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 04 Apr 2000 13:55:00 -0000 Subject: ldconfig References: <200004041438.QAA09681@hawking.suse.de> Message-ID: Andreas Schwab writes: > This is a patch for ldconfig, so that you don't get "unknown" when > printing the cache and the entry contains some flags in addition to the > type (FLAG_SPARC_LIB64 or FLAG_IA64_LIB64). Thanks, I've applied the patch. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Tue Apr 4 14:16:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 04 Apr 2000 14:16:00 -0000 Subject: error in utf-16.c References: <200004042250.aa02283@okarina.informatik.uni-kl.de> Message-ID: jaeger@informatik.uni-kl.de writes: > The problem is that PREPARE_LOOP declares a variable dir which is used > in FROM_DIRECTION - but FROM_DIRECTION is used first in skeleton.c. I've committed an, admittedly untested, patch. I'll test soon. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From jaeger@informatik.uni-kl.de Tue Apr 4 14:27:00 2000 From: jaeger@informatik.uni-kl.de (jaeger@informatik.uni-kl.de) Date: Tue, 04 Apr 2000 14:27:00 -0000 Subject: error in utf-16.c References: <200004042250.aa02283@okarina.informatik.uni-kl.de> Message-ID: >>>>> Ulrich Drepper writes: Ulrich> jaeger@informatik.uni-kl.de writes: >> The problem is that PREPARE_LOOP declares a variable dir which is used >> in FROM_DIRECTION - but FROM_DIRECTION is used first in skeleton.c. Ulrich> I've committed an, admittedly untested, patch. I'll test soon. Thanks, it compiles now on MIPS/Linux. Andreas -- Andreas Jaeger SuSE Labs aj@suse.de From jaeger@informatik.uni-kl.de Tue Apr 4 17:17:00 2000 From: jaeger@informatik.uni-kl.de (jaeger@informatik.uni-kl.de) Date: Tue, 04 Apr 2000 17:17:00 -0000 Subject: Patch for fgetexcptflg Message-ID: <200004050217.aa02375@okarina.informatik.uni-kl.de> Last time I forgot to send this patch. Andreas 2000-04-04 Andreas Jaeger * sysdeps/generic/fgetexcptflg.c: Use shlib-compat macros. ============================================================ Index: sysdeps/generic/fgetexcptflg.c --- sysdeps/generic/fgetexcptflg.c 2000/02/26 01:09:38 1.3 +++ sysdeps/generic/fgetexcptflg.c 2000/04/05 00:13:37 @@ -19,6 +19,7 @@ Boston, MA 02111-1307, USA. */ #include +#include int __fegetexceptflag (fexcept_t *flagp, int excepts) @@ -26,9 +27,11 @@ /* This always fails. */ return 1; } +#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) strong_alias (__fegetexceptflag, __old_fegetexceptflag) -symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1); -default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.2); +compat_symbol (libm, __old_fegetexceptflag, fegetexceptflag, GLIBC_2_1); +#endif +versioned_symbol (libm, __fegetexceptflag, fegetexceptflag, GLIBC_2_2); stub_warning (fegetexceptflag) #include -- Andreas Jaeger SuSE Labs aj@suse.de From jaeger@informatik.uni-kl.de Tue Apr 4 17:29:00 2000 From: jaeger@informatik.uni-kl.de (jaeger@informatik.uni-kl.de) Date: Tue, 04 Apr 2000 17:29:00 -0000 Subject: soversions.i not found with --disable-shared Message-ID: <200004050227.aa02392@okarina.informatik.uni-kl.de> Compiling glibc for ix86/linux with --disable-shared I get: make[1]: *** No rule to make target `/data/builds/glibc/20000404-main-static/soversions.i', needed by `/data/builds/glibc/20000404-main-static/Versions.all'. Anybody out there with a patch to fix this? Thanks a lot, Andreas -- Andreas Jaeger SuSE Labs aj@suse.de From roland@frob.com Tue Apr 4 17:46:00 2000 From: roland@frob.com (Roland McGrath) Date: Tue, 04 Apr 2000 17:46:00 -0000 Subject: soversions.i not found with --disable-shared References: <200004050227.aa02392@okarina.informatik.uni-kl.de> Message-ID: <200004050046.UAA08810@frob.com> > > Compiling glibc for ix86/linux with --disable-shared I get: > make[1]: *** No rule to make target > `/data/builds/glibc/20000404-main-static/soversions.i', > needed by `/data/builds/glibc/20000404-main-static/Versions.all'. > > Anybody out there with a patch to fix this? I just checked in a change that seems appropriate, though I didn't test your case. Here is the patch (or just cvs update). 2000-04-04 Roland McGrath * Makeconfig [$(build-shared) != yes] (versioning): Set to `no'. Index: Makeconfig =================================================================== RCS file: /cvs/glibc/libc/Makeconfig,v retrieving revision 1.233 retrieving revision 1.234 diff -u -b -p -r1.233 -r1.234 --- Makeconfig 2000/04/03 18:01:08 1.233 +++ Makeconfig 2000/04/05 00:44:59 1.234 @@ -762,6 +762,15 @@ ifndef rtld-version-installed-name rtld-version-installed-name = ld-$(version).so endif +else # build-shared != yes + +# Since symbol versioning is only meaningful for shared objects, +# turn this variable off when we aren't building any. +# The setting from config.make just tells us ld would support it if we cared. +# Clobbering it here avoids having to double-conditionalize everything +# on both $(versioning) and $(build-shared). +versioning := no + endif # build-shared ifneq (,$(findstring linuxthreads,$(add-ons))) From roland@frob.com Tue Apr 4 17:50:00 2000 From: roland@frob.com (Roland McGrath) Date: Tue, 04 Apr 2000 17:50:00 -0000 Subject: _dl_start_user Message-ID: <200004050050.UAA08885@frob.com> Please leave the _dl_start_user symbol in the RTLD_START macros for all machines. It is used by sysdeps/mach/hurd/dl-sysdep.c, and having it there for each cpu makes those future ports just that much easier. From jaeger@informatik.uni-kl.de Tue Apr 4 17:53:00 2000 From: jaeger@informatik.uni-kl.de (jaeger@informatik.uni-kl.de) Date: Tue, 04 Apr 2000 17:53:00 -0000 Subject: soversions.i not found with --disable-shared References: <200004050046.UAA08810@frob.com> Message-ID: >>>>> Roland McGrath writes: >> >> Compiling glibc for ix86/linux with --disable-shared I get: >> make[1]: *** No rule to make target >> `/data/builds/glibc/20000404-main-static/soversions.i', >> needed by `/data/builds/glibc/20000404-main-static/Versions.all'. >> >> Anybody out there with a patch to fix this? Roland> I just checked in a change that seems appropriate, though I didn't test Roland> your case. Here is the patch (or just cvs update). The problem doesn't occur anymore with your patch - and I hope to not find others ;-). Thanks, Andreas -- Andreas Jaeger SuSE Labs aj@suse.de From jaeger@informatik.uni-kl.de Tue Apr 4 18:09:00 2000 From: jaeger@informatik.uni-kl.de (jaeger@informatik.uni-kl.de) Date: Tue, 04 Apr 2000 18:09:00 -0000 Subject: Next problem with --disable-shared Message-ID: Here's the next problem with disable-shared: In file included from tmpfile.c:57: ../include/shlib-compat.h:26: abi-versions.h: No such file or directory make[2]: ***[/data/builds/glibc/20000404-main-static/stdio-common/tmpfile.o] Error 1 The problem is caused by: config.h:#define DO_VERSIONING 1 Andreas -- Andreas Jaeger SuSE Labs aj@suse.de From roland@frob.com Tue Apr 4 19:42:00 2000 From: roland@frob.com (Roland McGrath) Date: Tue, 04 Apr 2000 19:42:00 -0000 Subject: Next problem with --disable-shared References: Message-ID: <200004050242.WAA10036@frob.com> > > Here's the next problem with disable-shared: > > In file included from tmpfile.c:57: > ../include/shlib-compat.h:26: abi-versions.h: No such file or directory > make[2]: ***[/data/builds/glibc/20000404-main-static/stdio-common/tmpfile.o] Error 1 > > The problem is caused by: > config.h:#define DO_VERSIONING 1 Perhaps a better version of the solution I applied would be to do it in configure instead of in Makeconfig. Then DO_VERSIONING would be unset too. (Before someone asks, the reason shlib-compat.h doesn't test SHARED before including abi-versions.h is because the dependency generation pass does a single version and doesn't define SHARED, so you fail to get dependencies on abi-versions.h when you should.) Before I bother reverting my earlier change and hacking configure, why don't you try reverting the earlier change and hand-editting your config.h to #undef DO_VERSIONING and verify that your build works that way. From jaeger@informatik.uni-kl.de Tue Apr 4 20:53:00 2000 From: jaeger@informatik.uni-kl.de (jaeger@informatik.uni-kl.de) Date: Tue, 04 Apr 2000 20:53:00 -0000 Subject: Next problem with --disable-shared References: <200004050242.WAA10036@frob.com> Message-ID: >>>>> Roland McGrath writes: >> >> Here's the next problem with disable-shared: >> >> In file included from tmpfile.c:57: >> ../include/shlib-compat.h:26: abi-versions.h: No such file or directory >> make[2]: ***[/data/builds/glibc/20000404-main-static/stdio-common/tmpfile.o] Error 1 >> >> The problem is caused by: >> config.h:#define DO_VERSIONING 1 Roland> Perhaps a better version of the solution I applied would be to do it in Roland> configure instead of in Makeconfig. Then DO_VERSIONING would be unset too. We need to unset both - hacking configure might be the right thing. Roland> (Before someone asks, the reason shlib-compat.h doesn't test SHARED before Roland> including abi-versions.h is because the dependency generation pass does a Roland> single version and doesn't define SHARED, so you fail to get dependencies Roland> on abi-versions.h when you should.) Roland> Before I bother reverting my earlier change and hacking configure, why Roland> don't you try reverting the earlier change and hand-editting your Roland> config.h to #undef DO_VERSIONING and verify that your build works that way. I just undef????d DO_VERSIONING and was nearly sucessfull. I get now: gcc -nostdlib -nostartfiles -o /home/aj/build-glibc-static/nss/makedb /home/aj/build-glibc-static/csu/crt1.o /home/aj/build-glibc-static/csu/crti.o `gcc --print-file-name=crtbegin.o` /home/aj/build-glibc-static/nss/makedb.o /home/aj/build-glibc-static/dlfcn/libdl.a /home/aj/builld-glibc-static/nss/db-open.o /home/aj/build-glibc-static/libc.a -lgcc /home/aj/build-glibc-static/libc.a -lgcc `gcc --print-file-name=crtend.o` /home/aj/build-glibc-static/csu/crtn.o /home/aj/build-glibc-static/nss/db-open.o: In function `load_db': /home/aj/glibc-2.2/nss/nss_db/db-open.c:82: undefined reference to `dlopen' /home/aj/glibc-2.2/nss/nss_db/db-open.c:87: undefined reference to `dlsym' /home/aj/glibc-2.2/nss/nss_db/db-open.c:91: undefined reference to `dlsym' /home/aj/glibc-2.2/nss/nss_db/db-open.c:98: undefined reference to `dlsym' /home/aj/glibc-2.2/nss/nss_db/db-open.c:156: undefined reference to `dlclose' /home/aj/glibc-2.2/nss/nss_db/db-open.c:159: undefined reference to `dlerror' /home/aj/build-glibc-static/nss/db-open.o: In function `unload_db': /home/aj/glibc-2.2/nss/nss_db/db-open.c:172: undefined reference to `dlclose' collect2: ld returned 1 exit status make[2]: *** [/home/aj/build-glibc-static/nss/makedb] Error 1 make[2]: Leaving directory `/home/aj/glibc-2.2/nss' make[1]: *** [nss/others] Error 2 Changing the link order (adding libdl.a after db-open) fixes this - but I didn't succeed in changing the Makefile :-(. The only other problem is fixed with the appended patch. Andreas 2000-04-04 Andreas Jaeger * intl/Makefile: Only run the gettext test with shared libraries. ============================================================ Index: intl/Makefile --- intl/Makefile 2000/02/26 00:59:28 1.21 +++ intl/Makefile 2000/04/05 03:37:53 @@ -44,10 +44,12 @@ include ../Rules +ifeq (yes,$(build-shared)) .PHONY: do-gettext-test tests: do-gettext-test do-gettext-test: tst-gettext.sh $(objpfx)tst-gettext $(SHELL) -e $< $(common-objpfx) $(objpfx) +endif $(objpfx)msgs.h: po2test.sed ../po/de.po $(make-target-directory) -- Andreas Jaeger SuSE Labs aj@suse.de From roland@frob.com Tue Apr 4 21:04:00 2000 From: roland@frob.com (Roland McGrath) Date: Tue, 04 Apr 2000 21:04:00 -0000 Subject: Next problem with --disable-shared References: Message-ID: <200004050404.AAA10937@frob.com> I backed out the Makeconfig change and checked in a configure change that you should test. For the other problems, you're on your own. From schwab@suse.de Wed Apr 5 02:52:00 2000 From: schwab@suse.de (Andreas Schwab) Date: Wed, 05 Apr 2000 02:52:00 -0000 Subject: _dl_start_user References: <200004050050.UAA08885@frob.com> Message-ID: <200004050952.LAA19193@hawking.suse.de> Roland McGrath writes: |> Please leave the _dl_start_user symbol in the RTLD_START macros for all |> machines. It is used by sysdeps/mach/hurd/dl-sysdep.c, and having it there |> for each cpu makes those future ports just that much easier. Thanks for the note, I didn't look hard enough. Andreas. -- Andreas Schwab "And now for something SuSE Labs completely different." Andreas.Schwab@suse.de SuSE GmbH, Schanz????ckerstr. 10, D-90443 N????rnberg From schwab@suse.de Wed Apr 5 03:03:00 2000 From: schwab@suse.de (Andreas Schwab) Date: Wed, 05 Apr 2000 03:03:00 -0000 Subject: Next problem with --disable-shared References: <200004050242.WAA10036@frob.com> Message-ID: <200004051002.MAA21620@hawking.suse.de> jaeger@informatik.uni-kl.de writes: |> I get now: |> gcc -nostdlib -nostartfiles -o /home/aj/build-glibc-static/nss/makedb /home/aj/build-glibc-static/csu/crt1.o /home/aj/build-glibc-static/csu/crti.o `gcc --print-file-name=crtbegin.o` /home/aj/build-glibc-static/nss/makedb.o /home/aj/build-glibc-static/dlfcn/libdl.a /home/aj/builld-glibc-static/nss/db-open.o /home/aj/build-glibc-static/libc.a -lgcc /home/aj/build-glibc-static/libc.a -lgcc `gcc --print-file-name=crtend.o` /home/aj/build-glibc-static/csu/crtn.o |> /home/aj/build-glibc-static/nss/db-open.o: In function `load_db': |> /home/aj/glibc-2.2/nss/nss_db/db-open.c:82: undefined reference to `dlopen' |> /home/aj/glibc-2.2/nss/nss_db/db-open.c:87: undefined reference to `dlsym' |> /home/aj/glibc-2.2/nss/nss_db/db-open.c:91: undefined reference to `dlsym' |> /home/aj/glibc-2.2/nss/nss_db/db-open.c:98: undefined reference to `dlsym' |> /home/aj/glibc-2.2/nss/nss_db/db-open.c:156: undefined reference to `dlclose' |> /home/aj/glibc-2.2/nss/nss_db/db-open.c:159: undefined reference to `dlerror' |> /home/aj/build-glibc-static/nss/db-open.o: In function `unload_db': |> /home/aj/glibc-2.2/nss/nss_db/db-open.c:172: undefined reference to `dlclose' |> collect2: ld returned 1 exit status |> make[2]: *** [/home/aj/build-glibc-static/nss/makedb] Error 1 |> make[2]: Leaving directory `/home/aj/glibc-2.2/nss' |> make[1]: *** [nss/others] Error 2 |> |> Changing the link order (adding libdl.a after db-open) fixes this - |> but I didn't succeed in changing the Makefile :-(. Please try this patch: 2000-04-05 Andreas Schwab * nss/Makefile ($(objpfx)makedb): Move $(libdl) after db-open.o. Index: nss/Makefile =================================================================== RCS file: /cvs/glibc/libc/nss/Makefile,v retrieving revision 1.34 diff -u -a -u -r1.34 nss/Makefile --- nss/Makefile 2000/01/27 01:45:37 1.34 +++ nss/Makefile 2000/04/05 10:00:21 @@ -72,7 +72,7 @@ distribute += $(addprefix nss_db/, db-XXX.c nss_db.h dummy-db.h) -$(objpfx)makedb: $(libdl) $(objpfx)db-open.o +$(objpfx)makedb: $(objpfx)db-open.o $(libdl) # Build static module if requested ifneq ($(build-static-nss),yes) -- Andreas Schwab "And now for something SuSE Labs completely different." Andreas.Schwab@suse.de SuSE GmbH, Schanz????ckerstr. 10, D-90443 N????rnberg From drepper@redhat.com Wed Apr 5 09:03:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Wed, 05 Apr 2000 09:03:00 -0000 Subject: Next problem with --disable-shared References: <200004050242.WAA10036@frob.com> <200004051002.MAA21620@hawking.suse.de> Message-ID: Andreas Schwab writes: > 2000-04-05 Andreas Schwab > > * nss/Makefile ($(objpfx)makedb): Move $(libdl) after db-open.o. I've applied the patch. Thanks, -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From jaeger@informatik.uni-kl.de Wed Apr 5 12:11:00 2000 From: jaeger@informatik.uni-kl.de (jaeger@informatik.uni-kl.de) Date: Wed, 05 Apr 2000 12:11:00 -0000 Subject: Next problem with --disable-shared References: <200004050242.WAA10036@frob.com> <200004051002.MAA21620@hawking.suse.de> Message-ID: Thanks Roland and Andreas for your help. Now --disable-shared works fine for me on ix86/Linux. Andreas -- Andreas Jaeger SuSE Labs aj@suse.de From jaeger@informatik.uni-kl.de Wed Apr 5 13:27:00 2000 From: jaeger@informatik.uni-kl.de (jaeger@informatik.uni-kl.de) Date: Wed, 05 Apr 2000 13:27:00 -0000 Subject: init-first.h still needed? Message-ID: Do we still need init-first.h? I guess the following files can be removed now (and the Dist files cleaned up): sysdeps/unix/sysv/linux/alpha/init-first.h sysdeps/unix/sysv/linux/arm/init-first.h sysdeps/unix/sysv/linux/mips/init-first.h sysdeps/unix/sysv/linux/powerpc/init-first.h sysdeps/unix/sysv/linux/sparc/sparc32/init-first.h sysdeps/unix/sysv/linux/sparc/sparc64/init-first.h Andreas -- Andreas Jaeger SuSE Labs aj@suse.de From jakub@redhat.com Wed Apr 5 13:41:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Wed, 05 Apr 2000 13:41:00 -0000 Subject: [PATCH] Sparc fixes Message-ID: <20000405224350.H1468@sunsite.ms.mff.cuni.cz> Hi! Below are a few fixes for sparc and sparc64. First, inet_ntop implementation does not match the prototype. There was a include header loop in setjmp.h, solved by declaring the __jmp_buf structure without any reference to ucontext. And SPARC dl-machine.h's are updated for the new init function interface. sparc64 build is still in progress, but the compiled ld.so seem to run my 64bit binaries just fine, I have not tested sparc32 build yet, but the code is very similar to sparc64. 2000-04-05 Jakub Jelinek * resolv/inet_ntop.c (inet_ntop4, inet_ntop6, inet_ntop): Use socklen_t type for size. * sysdeps/sparc/sparc32/dl-machine.h (RTLD_START): Rewrite for new init function interface. * sysdeps/sparc/sparc64/dl-machine.h (RTLD_START): Likewise. * sysdeps/unix/sysv/linux/sparc/bits/setjmp.h: Don't include sys/ucontext.h. (__jmp_buf): Declare the whole type structure here, don't use ucontext. --- libc/resolv/inet_ntop.c.jj Sun Oct 3 02:04:43 1999 +++ libc/resolv/inet_ntop.c Wed Apr 5 15:38:32 2000 @@ -40,9 +40,9 @@ static char rcsid[] = "$Id: inet_ntop.c, * sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX. */ -static const char *inet_ntop4 __P((const u_char *src, char *dst, size_t size)) +static const char *inet_ntop4 __P((const u_char *src, char *dst, socklen_t size)) internal_function; -static const char *inet_ntop6 __P((const u_char *src, char *dst, size_t size)) +static const char *inet_ntop6 __P((const u_char *src, char *dst, socklen_t size)) internal_function; /* char * @@ -58,7 +58,7 @@ inet_ntop(af, src, dst, size) int af; const void *src; char *dst; - size_t size; + socklen_t size; { switch (af) { case AF_INET: @@ -88,7 +88,7 @@ internal_function inet_ntop4(src, dst, size) const u_char *src; char *dst; - size_t size; + socklen_t size; { static const char fmt[] = "%u.%u.%u.%u"; char tmp[sizeof "255.255.255.255"]; @@ -111,7 +111,7 @@ internal_function inet_ntop6(src, dst, size) const u_char *src; char *dst; - size_t size; + socklen_t size; { /* * Note that int32_t and int16_t need only be "at least" large enough @@ -189,7 +189,7 @@ inet_ntop6(src, dst, size) /* * Check for overflow, copy, and we're done. */ - if ((size_t)(tp - tmp) > size) { + if ((socklen_t)(tp - tmp) > size) { __set_errno (ENOSPC); return (NULL); } --- libc/sysdeps/sparc/sparc32/dl-machine.h.jj Tue Apr 4 11:56:31 2000 +++ libc/sysdeps/sparc/sparc32/dl-machine.h Wed Apr 5 22:14:17 2000 @@ -234,12 +234,11 @@ _dl_start_user: ld [%i0], %i0 tst %i0 beq 3f - nop + ld [%sp+22*4], %i5 /* load argc */ /* Find out how far to shift. */ - ld [%sp+22*4], %i1 /* load argc */ - sub %i1, %i0, %i1 + sub %i5, %i0, %i5 sll %i0, 2, %i2 - st %i1, [%sp+22*4] + st %i5, [%sp+22*4] add %sp, 23*4, %i1 add %i1, %i2, %i2 /* Copy down argv */ @@ -265,24 +264,17 @@ _dl_start_user: st %i4, [%i1+4] bne 23b add %i1, 8, %i1 - /* Load searchlist of the main object to pass to _dl_init_next. */ -3: sethi %hi(_dl_main_searchlist), %g1 - or %g1, %lo(_dl_main_searchlist), %g1 - ld [%l7+%g1], %l1 - ld [%l1], %l1 - /* Call _dl_init_next to return the address of an initializer to run. */ -4: call _dl_init_next - mov %l1, %o0 - tst %o0 - beq 5f - nop - jmpl %o0, %o7 - sub %o7, 28, %o7 - /* Clear the startup flag. */ -5: sethi %hi(_dl_starting_up), %g1 - or %g1, %lo(_dl_starting_up), %g1 - ld [%l7+%g1], %g1 - st %g0, [%g1] + /* %o0 = _dl_loaded, %o1 = argc, %o2 = argv, %o3 = envp. */ +3: sethi %hi(_dl_loaded), %o0 + add %sp, 23*4, %o2 + orcc %o0, %lo(_dl_loaded), %o0 + sll %i5, 2, %o3 + ld [%l7+%o0], %o0 + add %o3, 4, %o3 + mov %i5, %o1 + add %o2, %o3, %o3 + call _dl_init + ld [%o0], %o0 /* Pass our finalizer function to the user in %g1. */ sethi %hi(_dl_fini), %g1 or %g1, %lo(_dl_fini), %g1 --- libc/sysdeps/sparc/sparc64/dl-machine.h.jj Tue Apr 4 11:56:31 2000 +++ libc/sysdeps/sparc/sparc64/dl-machine.h Wed Apr 5 22:14:17 2000 @@ -540,12 +540,11 @@ _dl_start_user: ldx [%l7+%g5], %i0 ld [%i0], %i0 brz,pt %i0, 2f - nop + ldx [%sp+" __S(STACK_BIAS) "+22*8], %i5 /* Find out how far to shift. */ - ldx [%sp+" __S(STACK_BIAS) "+22*8], %i1 - sub %i1, %i0, %i1 + sub %i5, %i0, %i5 sllx %i0, 3, %i2 - stx %i1, [%sp+" __S(STACK_BIAS) "+22*8] + stx %i5, [%sp+" __S(STACK_BIAS) "+22*8] add %sp, " __S(STACK_BIAS) "+23*8, %i1 add %i1, %i2, %i2 /* Copy down argv. */ @@ -568,23 +567,17 @@ _dl_start_user: stx %i4, [%i1+8] brnz,pt %i3, 13b add %i1, 16, %i1 - /* Load searchlist of the main object to pass to _dl_init_next. */ -2: sethi %hi(_dl_main_searchlist), %g5 - or %g5, %lo(_dl_main_searchlist), %g5 - ldx [%l7+%g5], %g5 - ldx [%g5], %l1 - /* Call _dl_init_next to return the address of an initializer to run. */ -3: call _dl_init_next - mov %l1, %o0 - brz,pn %o0, 4f - nop - jmpl %o0, %o7 - sub %o7, 24, %o7 - /* Clear the startup flag. */ -4: sethi %hi(_dl_starting_up), %g5 - or %g5, %lo(_dl_starting_up), %g5 - ldx [%l7+%g5], %g5 - st %g0, [%g5] + /* %o0 = _dl_loaded, %o1 = argc, %o2 = argv, %o3 = envp. */ +2: sethi %hi(_dl_loaded), %o0 + add %sp, " __S(STACK_BIAS) "+23*8, %o2 + orcc %o0, %lo(_dl_loaded), %o0 + sllx %i5, 3, %o3 + ldx [%l7+%o0], %o0 + add %o3, 8, %o3 + mov %i5, %o1 + add %o2, %o3, %o3 + call _dl_init + ldx [%o0], %o0 /* Pass our finalizer function to the user in %g1. */ sethi %hi(_dl_fini), %g1 or %g1, %lo(_dl_fini), %g1 --- libc/sysdeps/unix/sysv/linux/sparc/bits/setjmp.h.jj Tue May 25 13:52:02 1999 +++ libc/sysdeps/unix/sysv/linux/sparc/bits/setjmp.h Wed Mar 29 17:36:18 2000 @@ -1,4 +1,4 @@ -/* Copyright (C) 1997,1999 Free Software Foundation, Inc. +/* Copyright (C) 1997,1999,2000 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,9 +25,35 @@ #if __WORDSIZE == 64 -#include - -typedef ucontext_t __jmp_buf[1]; +#ifndef _ASM +typedef struct __sparc64_jmp_buf + { + struct __sparc64_jmp_buf *uc_link; + unsigned long uc_flags; + unsigned long uc_sigmask; + struct __sparc64_jmp_buf_mcontext + { + unsigned long mc_gregs[19]; + unsigned long mc_fp; + unsigned long mc_i7; + struct __sparc64_jmp_buf_fpu + { + union + { + unsigned int sregs[32]; + unsigned long dregs[32]; + long double qregs[16]; + } mcfpu_fpregs; + unsigned long mcfpu_fprs; + unsigned long mcfpu_gsr; + void *mcfpu_fq; + unsigned char mcfpu_qcnt; + unsigned char mcfpu_qentsz; + unsigned char mcfpu_enab; + } mc_fpregs; + } uc_mcontext; + } __jmp_buf[1]; +#endif /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ Jakub From drepper@redhat.com Wed Apr 5 21:58:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Wed, 05 Apr 2000 21:58:00 -0000 Subject: init-first.h still needed? References: Message-ID: jaeger@informatik.uni-kl.de writes: > Do we still need init-first.h? No. I've removed them now. Thanks, -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Wed Apr 5 22:01:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Wed, 05 Apr 2000 22:01:00 -0000 Subject: [PATCH] Sparc fixes References: <20000405224350.H1468@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > Below are a few fixes for sparc and sparc64. Thanks, I've applied them. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From jakub@redhat.com Thu Apr 6 03:14:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Thu, 06 Apr 2000 03:14:00 -0000 Subject: [PATCH] One more Sparc fix Message-ID: <20000406121706.J1468@sunsite.ms.mff.cuni.cz> Hi! One further thing which popped up at the very end of build after I've sent the last patch. bits/sigcontext.h is unprotected against multiple inclusion so when somebody includes signal.h together with register-dump.h, compilation fails. With this I get full sparc64-linux libc to build finally. 2000-04-06 Jakub Jelinek * sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h: Include signal.h instead of bits/sigcontext.h. * sysdeps/unix/sysv/linux/sparc/sparc64/register-dump.h: Likewise. --- libc/sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h.jj Mon Jan 17 07:58:55 2000 +++ libc/sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h Thu Apr 6 10:15:56 2000 @@ -20,7 +20,7 @@ #include #include -#include +#include /* We will print the register dump in this format: --- libc/sysdeps/unix/sysv/linux/sparc/sparc64/register-dump.h.jj Fri Dec 10 15:15:34 1999 +++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/register-dump.h Thu Apr 6 10:09:18 2000 @@ -20,7 +20,7 @@ #include #include -#include +#include /* We will print the register dump in this format: Jakub From kukuk@suse.de Thu Apr 6 04:30:00 2000 From: kukuk@suse.de (Thorsten Kukuk) Date: Thu, 06 Apr 2000 04:30:00 -0000 Subject: [PATCH] One more Sparc fix References: <20000406121706.J1468@sunsite.ms.mff.cuni.cz> Message-ID: <20000406133022.A1221@Wotan.suse.de> Hi, On Thu, Apr 06, Jakub Jelinek wrote: > Hi! > > One further thing which popped up at the very end of build after I've sent > the last patch. bits/sigcontext.h is unprotected against multiple inclusion > so when somebody includes signal.h together with register-dump.h, > compilation fails. Do we need or in register-dump.h ? In my local tree, I have removed this includes, and it compiles and seems to work. (But it this is from a backport to 2.1.3). Thorsten -- Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de SuSE GmbH Schanzaeckerstr. 10 90443 Nuernberg Linux is like a Vorlon. It is incredibly powerful, gives terse, cryptic answers and has a lot of things going on in the background. From jakub@redhat.com Thu Apr 6 04:38:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Thu, 06 Apr 2000 04:38:00 -0000 Subject: [PATCH] One more Sparc fix References: <20000406121706.J1468@sunsite.ms.mff.cuni.cz> <20000406133022.A1221@Wotan.suse.de> Message-ID: <20000406134057.A9897@sunsite.ms.mff.cuni.cz> On Thu, Apr 06, 2000 at 01:30:22PM +0200, Thorsten Kukuk wrote: > > Hi, > > On Thu, Apr 06, Jakub Jelinek wrote: > > > Hi! > > > > One further thing which popped up at the very end of build after I've sent > > the last patch. bits/sigcontext.h is unprotected against multiple inclusion > > so when somebody includes signal.h together with register-dump.h, > > compilation fails. > > Do we need or in register-dump.h ? > In my local tree, I have removed this includes, and it compiles > and seems to work. (But it this is from a backport to 2.1.3). As segfault.c which is the only one which includes register-dump.h now includes signal.h it is not necessary, yes. I put it there so that it is clear that header depends on signal.h but as i386 does not have that include there and implicitely assumes it as well, the following patch could be better: 2000-04-06 Jakub Jelinek * sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h: Don't include bits/sigcontext.h. * sysdeps/unix/sysv/linux/sparc/sparc64/register-dump.h: Likewise. --- libc/sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h.jj Mon Jan 17 07:58:55 2000 +++ libc/sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h Thu Apr 6 10:15:56 2000 @@ -20,7 +20,6 @@ #include #include -#include /* We will print the register dump in this format: --- libc/sysdeps/unix/sysv/linux/sparc/sparc64/register-dump.h.jj Fri Dec 10 15:15:34 1999 +++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/register-dump.h Thu Apr 6 10:09:18 2000 @@ -20,7 +20,6 @@ #include #include -#include /* We will print the register dump in this format: Jakub From drepper@redhat.com Thu Apr 6 13:08:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Thu, 06 Apr 2000 13:08:00 -0000 Subject: [PATCH] One more Sparc fix References: <20000406121706.J1468@sunsite.ms.mff.cuni.cz> <20000406133022.A1221@Wotan.suse.de> <20000406134057.A9897@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > 2000-04-06 Jakub Jelinek > > * sysdeps/unix/sysv/linux/sparc/sparc32/register-dump.h: Don't > include bits/sigcontext.h. > * sysdeps/unix/sysv/linux/sparc/sparc64/register-dump.h: Likewise. I've applied the patch. Thanks, -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From schwab@suse.de Mon Apr 10 07:38:00 2000 From: schwab@suse.de (Andreas Schwab) Date: Mon, 10 Apr 2000 07:38:00 -0000 Subject: globtest.sh Message-ID: <200004101438.QAA13793@hawking.suse.de> The "noread" glob tests in 2.2 cannot be run as root since root can read everything. That should be handled gracefully. Andreas. 2000-04-10 Andreas Schwab * posix/globtest.sh: Skip tests that depend on unreadable directories if run as root. Index: posix/globtest.sh =================================================================== RCS file: /cvs/glibc/libc/posix/globtest.sh,v retrieving revision 1.11 diff -u -a -u -r1.11 posix/globtest.sh --- posix/globtest.sh 2000/03/20 00:45:09 1.11 +++ posix/globtest.sh 2000/04/10 14:34:51 @@ -306,6 +306,9 @@ GLOB_NOMATCH EOF +# The following tests will fail if run as root. +if test "`id -un`" != root; then + # ... with GLOB_ERR ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ ${common_objpfx}posix/globtest -E "$testdir" "noread/*" | @@ -320,6 +323,8 @@ cat <<"EOF" | cmp - $testout || result=1 GLOB_ABORTED EOF + +endif # not run as root # Try multiple patterns (GLOB_APPEND) ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ -- Andreas Schwab "And now for something SuSE Labs completely different." Andreas.Schwab@suse.de SuSE GmbH, Schanz????ckerstr. 10, D-90443 N????rnberg From jakub@redhat.com Mon Apr 10 07:43:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Mon, 10 Apr 2000 07:43:00 -0000 Subject: globtest.sh References: <200004101438.QAA13793@hawking.suse.de> Message-ID: <20000410164547.C607@sunsite.ms.mff.cuni.cz> On Mon, Apr 10, 2000 at 04:38:30PM +0200, Andreas Schwab wrote: > The "noread" glob tests in 2.2 cannot be run as root since root can read > everything. That should be handled gracefully. > > Andreas. > > 2000-04-10 Andreas Schwab > > * posix/globtest.sh: Skip tests that depend on unreadable > directories if run as root. > > Index: posix/globtest.sh > =================================================================== > RCS file: /cvs/glibc/libc/posix/globtest.sh,v > retrieving revision 1.11 > diff -u -a -u -r1.11 posix/globtest.sh > --- posix/globtest.sh 2000/03/20 00:45:09 1.11 > +++ posix/globtest.sh 2000/04/10 14:34:51 > @@ -306,6 +306,9 @@ > GLOB_NOMATCH > EOF > > +# The following tests will fail if run as root. > +if test "`id -un`" != root; then > + > # ... with GLOB_ERR > ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ > ${common_objpfx}posix/globtest -E "$testdir" "noread/*" | > @@ -320,6 +323,8 @@ > cat <<"EOF" | cmp - $testout || result=1 > GLOB_ABORTED > EOF > + > +endif # not run as root ^^^^^ ?? Shouldn't it be fi # not run as root ? Jakub From schwab@suse.de Mon Apr 10 07:47:00 2000 From: schwab@suse.de (Andreas Schwab) Date: Mon, 10 Apr 2000 07:47:00 -0000 Subject: globtest.sh References: <200004101438.QAA13793@hawking.suse.de> <20000410164547.C607@sunsite.ms.mff.cuni.cz> Message-ID: <200004101446.QAA20628@hawking.suse.de> Jakub Jelinek writes: |> On Mon, Apr 10, 2000 at 04:38:30PM +0200, Andreas Schwab wrote: |> > The "noread" glob tests in 2.2 cannot be run as root since root can read |> > everything. That should be handled gracefully. |> > |> > Andreas. |> > |> > 2000-04-10 Andreas Schwab |> > |> > * posix/globtest.sh: Skip tests that depend on unreadable |> > directories if run as root. |> > |> > Index: posix/globtest.sh |> > =================================================================== |> > RCS file: /cvs/glibc/libc/posix/globtest.sh,v |> > retrieving revision 1.11 |> > diff -u -a -u -r1.11 posix/globtest.sh |> > --- posix/globtest.sh 2000/03/20 00:45:09 1.11 |> > +++ posix/globtest.sh 2000/04/10 14:34:51 |> > @@ -306,6 +306,9 @@ |> > GLOB_NOMATCH |> > EOF |> > |> > +# The following tests will fail if run as root. |> > +if test "`id -un`" != root; then |> > + |> > # ... with GLOB_ERR |> > ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ |> > ${common_objpfx}posix/globtest -E "$testdir" "noread/*" | |> > @@ -320,6 +323,8 @@ |> > cat <<"EOF" | cmp - $testout || result=1 |> > GLOB_ABORTED |> > EOF |> > + |> > +endif # not run as root |> ^^^^^ ?? |> Shouldn't it be |> fi # not run as root Oops, yes, of course. Apologies for not testing it. Andreas. 2000-04-10 Andreas Schwab * posix/globtest.sh: Skip tests that depend on unreadable directories if run as root. Index: posix/globtest.sh =================================================================== RCS file: /cvs/glibc/libc/posix/globtest.sh,v retrieving revision 1.11 diff -u -a -u -r1.11 posix/globtest.sh --- posix/globtest.sh 2000/03/20 00:45:09 1.11 +++ posix/globtest.sh 2000/04/10 14:45:20 @@ -306,6 +306,9 @@ GLOB_NOMATCH EOF +# The following tests will fail if run as root. +if test "`id -un`" != root; then + # ... with GLOB_ERR ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ ${common_objpfx}posix/globtest -E "$testdir" "noread/*" | @@ -320,6 +323,8 @@ cat <<"EOF" | cmp - $testout || result=1 GLOB_ABORTED EOF + +fi # not run as root # Try multiple patterns (GLOB_APPEND) ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ -- Andreas Schwab "And now for something SuSE Labs completely different." Andreas.Schwab@suse.de SuSE GmbH, Schanz????ckerstr. 10, D-90443 N????rnberg From drepper@redhat.com Mon Apr 10 08:55:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 10 Apr 2000 08:55:00 -0000 Subject: globtest.sh References: <200004101438.QAA13793@hawking.suse.de> <20000410164547.C607@sunsite.ms.mff.cuni.cz> <200004101446.QAA20628@hawking.suse.de> Message-ID: Andreas Schwab writes: > 2000-04-10 Andreas Schwab > > * posix/globtest.sh: Skip tests that depend on unreadable > directories if run as root. Thanks, I've applied the patch. I've changed it slightly (id wasn't required so far) and hopefully haven't broken it. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From kukuk@suse.de Mon Apr 10 09:01:00 2000 From: kukuk@suse.de (Thorsten Kukuk) Date: Mon, 10 Apr 2000 09:01:00 -0000 Subject: [PATCH] ldconfig Message-ID: <20000410180047.A16712@Wotan.suse.de> Hi, here is a small patch for ldconfig. The access rights for /etc/ld.so.cache needs to be 0644, or a normal user cannot read it. But in the moment a umask of 077 will result in a unreadable ld.so.cache. Thorsten 2000-04-10 Thorsten Kukuk * elf/cache.c: Make sure /etc/ld.so.cache is mode 644 --- elf/cache.c +++ elf/cache.c 2000/04/10 11:55:09 @@ -1,4 +1,4 @@ -/* Copyright (C) 1999 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger , 1999. @@ -301,11 +301,15 @@ close (fd); + /* Make sure user can always read cache file */ + if (chmod (temp_name, 0644)) + error (EXIT_FAILURE, errno, _("Chmod of %s to 0644 failed"), temp_name); + /* Move temporary to its final location. */ if (rename (temp_name, cache_name)) error (EXIT_FAILURE, errno, _("Renaming of %s to %s failed"), temp_name, cache_name); - + /* Free all allocated memory. */ free (file_entries); free (strings); -- Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de SuSE GmbH Schanzaeckerstr. 10 90443 Nuernberg Linux is like a Vorlon. It is incredibly powerful, gives terse, cryptic answers and has a lot of things going on in the background. From drepper@redhat.com Mon Apr 10 09:25:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 10 Apr 2000 09:25:00 -0000 Subject: [PATCH] ldconfig References: <20000410180047.A16712@Wotan.suse.de> Message-ID: Thorsten Kukuk writes: > here is a small patch for ldconfig. The access rights for > /etc/ld.so.cache needs to be 0644, or a normal user cannot read it. > But in the moment a umask of 077 will result in a unreadable ld.so.cache. I've checked the change in. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From kukuk@suse.de Mon Apr 10 13:37:00 2000 From: kukuk@suse.de (Thorsten Kukuk) Date: Mon, 10 Apr 2000 13:37:00 -0000 Subject: stat syscall/negative st_size Message-ID: <20000410223703.A20242@Wotan.suse.de> Hi, I found one problem with stat and files which have a size between 2 and 4 GB. On mips, ppc and sparc, the field st_size of struct stat is off_t (signed long). glibc also uses off_t for the st_size field. On the other architectures it is unsigned long. Now the kernel returns a negative value for files bigger 2GB on mips, ppc and sparc. This causes problems if you try to cast this field to unsigned long long, which would work on Intel (but not if you use the glibc header files, here you have the same problem: casting a signed long to a unsinged long long). My question is: Shouldn't the kernel return an error code, if the filesize is bigger then 2GB ? Then the application knows that it has to call stat64. Or should we add an extra check in the glibc stat wrapper, which generates the error ? I think the kernel shouldn't return negative file sizes in a stat call. Comments ? Thorsten -- Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de SuSE GmbH Schanzaeckerstr. 10 90443 Nuernberg Linux is like a Vorlon. It is incredibly powerful, gives terse, cryptic answers and has a lot of things going on in the background. From drepper@redhat.com Mon Apr 10 23:26:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 10 Apr 2000 23:26:00 -0000 Subject: command line length limitations Message-ID: I changed a bit of version information today and on starting mail I got again the message that the command line is too long. Looking around a bit it seems the message comes from bash. I replaced the 2.03 version I had instaleed with a 2.04 test release and it works. It seems we have to require bash 2.04, at least not 2.03. Anybody seeing anything like this? This all happens while constructing sysd-versions. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Tue Apr 11 00:16:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 11 Apr 2000 00:16:00 -0000 Subject: more clock_* support Message-ID: Hi, I've checked in some changes to implement more clock_* functionality. For x86 we have now a clock which is using the TSC. Both Linux and Hurd should have the functionality (although it cannot quite yet work on Hurd since I don't know how to get the processor frequency; Roland, Mark, your call). The new function from one of the latest POSIX drafts to get the ID of such a counter is also included. But: the code is really untested. It's too late now, will do this tomorrow. One thing you'll notice is that the clock_* and timer_* functions are moved into librt. This is not only where other platforms have them, we have to have them there because of the upcoming timer_* implementation which will, lacking kernel support, use threads. Since the functions were not in glibc 2.1 there is not compatiblity issue. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From schwab@suse.de Tue Apr 11 02:55:00 2000 From: schwab@suse.de (Andreas Schwab) Date: Tue, 11 Apr 2000 02:55:00 -0000 Subject: globtest.sh References: <200004101438.QAA13793@hawking.suse.de> <20000410164547.C607@sunsite.ms.mff.cuni.cz> <200004101446.QAA20628@hawking.suse.de> Message-ID: <200004110954.LAA29217@hawking.suse.de> Ulrich Drepper writes: |> Andreas Schwab writes: |> |> > 2000-04-10 Andreas Schwab |> > |> > * posix/globtest.sh: Skip tests that depend on unreadable |> > directories if run as root. |> |> Thanks, I've applied the patch. I've changed it slightly (id wasn't |> required so far) and hopefully haven't broken it. Sorry, you did. Index: posix/globtest.sh =================================================================== RCS file: /cvs/glibc/libc/posix/globtest.sh,v retrieving revision 1.12 diff -u -a -u -r1.12 posix/globtest.sh --- posix/globtest.sh 2000/04/10 15:55:00 1.12 +++ posix/globtest.sh 2000/04/11 09:52:39 @@ -319,14 +319,14 @@ cat <<"EOF" | cmp - $testout || result=1 GLOB_ABORTED EOF -fi # not run as root -${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ -${common_objpfx}posix/globtest -E "$testdir" "noread*/*" | -sort > $testout -cat <<"EOF" | cmp - $testout || result=1 + ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}posix/globtest -E "$testdir" "noread*/*" | + sort > $testout + cat <<"EOF" | cmp - $testout || result=1 GLOB_ABORTED EOF +fi # not run as root # Try multiple patterns (GLOB_APPEND) ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ -- Andreas Schwab "And now for something SuSE Labs completely different." Andreas.Schwab@suse.de SuSE GmbH, Schanz????ckerstr. 10, D-90443 N????rnberg From schwab@suse.de Tue Apr 11 03:00:00 2000 From: schwab@suse.de (Andreas Schwab) Date: Tue, 11 Apr 2000 03:00:00 -0000 Subject: command line length limitations References: Message-ID: <200004110959.LAA29269@hawking.suse.de> Ulrich Drepper writes: |> I changed a bit of version information today and on starting mail I |> got again the message that the command line is too long. Looking |> around a bit it seems the message comes from bash. I replaced the |> 2.03 version I had instaleed with a 2.04 test release and it works. |> |> It seems we have to require bash 2.04, at least not 2.03. |> |> Anybody seeing anything like this? This all happens while |> constructing sysd-versions. I have never seen that myself. Bash does not have any builtin limit on the command line length. Bash 2.04 is not the right solution, because it has a bug in that it refuses to run if there are environment variables with a hyphen in their name. This means it is unusable for compiling glibc. Andreas. -- Andreas Schwab "And now for something SuSE Labs completely different." Andreas.Schwab@suse.de SuSE GmbH, Schanz????ckerstr. 10, D-90443 N????rnberg From kettenis@wins.uva.nl Tue Apr 11 04:28:00 2000 From: kettenis@wins.uva.nl (Mark Kettenis) Date: Tue, 11 Apr 2000 04:28:00 -0000 Subject: command line length limitations References: <200004110959.LAA29269@hawking.suse.de> Message-ID: <200004111128.NAA00943@landau.wins.uva.nl> Date: Tue, 11 Apr 2000 11:59:55 +0200 From: Andreas Schwab Ulrich Drepper writes: |> I changed a bit of version information today and on starting mail I |> got again the message that the command line is too long. Looking |> around a bit it seems the message comes from bash. I replaced the |> 2.03 version I had instaleed with a 2.04 test release and it works. |>=20 |> It seems we have to require bash 2.04, at least not 2.03. |>=20 |> Anybody seeing anything like this? This all happens while |> constructing sysd-versions. I have never seen that myself. Bash does not have any builtin limit on the command line length. Bash 2.04 is not the right solution, because it has a bug in that it refuses to run if there are environment variables with a hyphen in their name. This means it is unusable for compiling glibc. >From a quick look at the code, I believe it's just a warning. I managed to cross-compile glibc for the Hurd with bash 2.04. There was an annoying problem with generating sysd-sorted though, which I fixed by tweaking Makeconfig. The funny thing is that when I configured glibc for Linux, sysd-sorted was generated correctly. So I'm not sure whether this problem is related to bash at all. Mark PS By the way, Andreas, a while ago your mails started to be polluted by =-signs, sometimes followed by two hexadecimal numbers, that I've only seen before in messages from people using a certain inferior OS. Any clue what's happening? From drepper@redhat.com Tue Apr 11 07:54:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 11 Apr 2000 07:54:00 -0000 Subject: command line length limitations References: <200004110959.LAA29269@hawking.suse.de> Message-ID: Andreas Schwab writes: > I have never seen that myself. Bash does not have any builtin limit on > the command line length. There seems to be something. I'll have to get the sources for the bash version which has the problems. > Bash 2.04 is not the right solution, because it has a bug in that it > refuses to run if there are environment variables with a hyphen in > their name. This means it is unusable for compiling glibc. I'm using a test release of 2.04 which does not have this problem. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Tue Apr 11 09:27:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 11 Apr 2000 09:27:00 -0000 Subject: globtest.sh References: <200004101438.QAA13793@hawking.suse.de> <20000410164547.C607@sunsite.ms.mff.cuni.cz> <200004101446.QAA20628@hawking.suse.de> <200004110954.LAA29217@hawking.suse.de> Message-ID: Andreas Schwab writes: > Sorry, you did. OK, fixed now. Thanks, -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Tue Apr 11 10:06:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 11 Apr 2000 10:06:00 -0000 Subject: memory barriers in linuxthread Message-ID: Hi, I've checked in a patch to add memory barriers in the thread code where they are necessary. Xavier sent the patch based on comments from Mike Burrows from DEC. Xavier added a few comments in the pt-machine.h files for the architectures (Alpha, PPC, SPARC, SPARC64). Please take a look whether the introduced definitions are correct and optimal. For MIPS and IA-64: you'll have to come up with appropriate definitions. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From aj@oss.sgi.com Wed Apr 12 12:22:00 2000 From: aj@oss.sgi.com (Andreas Jaeger) Date: Wed, 12 Apr 2000 12:22:00 -0000 Subject: Some patches for new clock functions Message-ID: I got some warnings when compiling and fixed them: - Fixed some typos - We weren't always setting retval - memmem needs Andreas 2000-04-12 Andreas Jaeger * sysdeps/unix/i386/i586/clock_getres.c (EXTRA_CLOCK_CASES): Set retval for error case. * sysdeps/unix/i386/i586/clock_gettime.c: Fix typo. (EXTRA_CLOCK_CASES): Set retval for error case. * sysdeps/unix/sysv/linux/i386/get_clockfreq.c: Include for memmem declaration. ============================================================ Index: sysdeps/unix/i386/i586/clock_getres.c --- sysdeps/unix/i386/i586/clock_getres.c 2000/04/11 16:14:22 1.2 +++ sysdeps/unix/i386/i586/clock_getres.c 2000/04/12 19:17:45 @@ -53,8 +53,11 @@ lead to the same result. */ \ freq = __get_clockfreq (); \ if (__builtin_expect (freq == 0, 0)) \ - /* Something went wrong. */ \ - break; \ + { \ + /* Something went wrong. */ \ + retval = -1; \ + break; \ + } \ \ nsec = MAX (1000000000ULL / freq, 1); \ } \ ============================================================ Index: sysdeps/unix/i386/i586/clock_gettime.c --- sysdeps/unix/i386/i586/clock_gettime.c 2000/04/11 16:15:31 1.2 +++ sysdeps/unix/i386/i586/clock_gettime.c 2000/04/12 19:17:45 @@ -27,7 +27,7 @@ /* Function to determine processor frequency. */ -extern unsigned long long int __get_glockfreq (void); +extern unsigned long long int __get_clockfreq (void); /* Clock frequency of the processor. We make it a 64-bit variable because some jokers are already playing with processors with more @@ -52,8 +52,11 @@ lead to the same result. */ \ freq = __get_clockfreq (); \ if (__builtin_expect (freq == 0, 0)) \ - /* Something went wrong. */ \ - break; \ + { \ + /* Something went wrong. */ \ + retval = -1; \ + break; \ + } \ } \ \ /* Get the current counter. */ \ ============================================================ Index: sysdeps/unix/sysv/linux/i386/get_clockfreq.c --- sysdeps/unix/sysv/linux/i386/get_clockfreq.c 2000/04/11 16:16:07 1.2 +++ sysdeps/unix/sysv/linux/i386/get_clockfreq.c 2000/04/12 19:17:45 @@ -20,6 +20,7 @@ #include #include #include +#include unsigned long long int -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de currently: aj@oss.sgi.com From hjl@valinux.com Wed Apr 12 12:46:00 2000 From: hjl@valinux.com (H . J . Lu) Date: Wed, 12 Apr 2000 12:46:00 -0000 Subject: Binutils 2.9.5.0.35 is released. Message-ID: <20000412124142.A5865@valinux.com> This is the beta release of binutils 2.9.5.0.35 for Linux, which is based on binutils 2000 0412 plus various changes. It is purely for Linux, although it has been tested on Solaris/Sparc and Solaris/x86 from time to time. I am planning to make the public release soon. Please test it as much as you can. Please report any bugs related to binutils 2.9.5.0.35 to hjl@lucon.org. For arm-linux targets, there are some important differences in behaviour between these tools and binutils 2.9.1.0.x. The linker emulation name has changed from elf32arm{26} to armelf_linux{26}. Also, the "-p" flag must be passed with the linker when working with object files (or static libraries) created using older versions of the assembler. If this flag is omitted the linker will silently generate bad output when given old input files. To get the correct behaviour from gcc, amend the *link section of your specs file as follows: *link: %{h*} %{version:-v} %{b} %{Wl,*:%*} %{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} %{rdynamic:-export-dynamic} %{!dynamic-linker: -dynamic-linker /lib/ld-linux.so.2} -X %{mbig-endian:-EB} %{mapcs-26:-m armelf_linux26} %{!mapcs-26:-m armelf_linux} -p Changes from binutils 2.9.5.0.34: 1. Update from binutils 2000 0412. Fix a relocation bug which affects the Linux kernel compilation. 2. An ELF/PPC linker script update. Changes from binutils 2.9.5.0.33: 1. Update from binutils 2000 0404. Fix the bug report bug. Changes from binutils 2.9.5.0.32: 1. Update from binutils 2000 0403. Fix the 16bit ia32 assembler bug. Changes from binutils 2.9.5.0.31: 1. Update from binutils 2000 0331. Fix the Linux/ARM assembler bug. 2. Fix a Debian assembler security bug. Changes from binutils 2.9.5.0.29: 1. Update from binutils 2000 0319. 2. An ELF/alpha bug is fixed. Changes from binutils 2.9.5.0.27: 1. Update from binutils 2000 0301. 2. A demangler bug is fixed. 3. A better fix for undefined symbols with -Bsymbolic when building shared library. Changes from binutils 2.9.5.0.24: 1. Update from binutils 2000 0204. 2. Added -taso to linker on alpha. 3. Fixed a -shared -Bsymbolic bug when PIC is not used. Changes from binutils 2.9.5.0.22: 1. Update from binutils 2000 0113. 2. A symbol version bug is fixed. 3. A -Bsymbolic bug is fixed. Changes from binutils 2.9.5.0.21: 1. Update from binutils 1999 1202. 2. Remove a MIPS/ELF change. 3. Enable SOM for HPPA. Changes from binutils 2.9.5.0.19: 1. Update from binutils 1999 1122. An ia32 gas bug is fixed. Changes from binutils 2.9.5.0.16: 1. Update from binutils 1999 1104. 2. i370 is changed to use EM_S370 and ELFOSABI_LINUX. Update readelf. 3. Fix Compaq's demangler support. Changes from binutils 2.9.5.0.14: 1. Update from binutils 1999 1012. A gas bug which affects Linux 2.3.21 is fixed. 2. i370 update. 3. The new demangler code. You should use "--style=xxx" to select the demnangle style instead of "--lang=xxx". Changes from binutils 2.9.5.0.13: 1. Update from binutils 1999 0925. 2. Fix a -s and linker script bug. Changes from binutils 2.9.5.0.12: 1. Update from binutils 1999 0922. 2. i370 update. Changes from binutils 2.9.5.0.11: 1. Update from binutils 1999 0910. It fixed a PIC linker bug on ix86 and sparc introduced in the last release. 2. i370 update. Changes from binutils 2.9.5.0.10: 1. Update from binutils 1999 0906. It fixed a PIC linker bug on ix86 and sparc. 2. Remove elf/hppa since it is WIP. Changes from binutils 2.9.5.0.8: 1. Update from binutils 1999 0831. It allows spaces around '(' and ')' in x86 FP register names. Changes from binutils 2.9.5.0.7: 1. Update from binutils 1999 0821. 2. Some MIPS changes. Changes from binutils 2.9.5.0.6: 1. Update from binutils 1999 0813. 2. i370 update. Changes from binutils 2.9.5.0.5: 1. Update from binutils 1999 0809. An ELF/Sparc ld bug is fixed. Changes from binutils 2.9.5.0.4: 1. Update from binutils 1999 0806. A Solaris/Sparc gas bug is fixed. 2. Remove mips gas patches from binutils 2.9.1.0.25. Changes from binutils 2.9.5.0.3: 1. Update from binutils 1999 0801. 2. Support for real mode x86 gcc. Changes from binutils 2.9.4.0.8: 1. Update from binutils 1999 0719. A libc 5 related bug fix. 2. Fix a typo in mips gas. Changes from binutils 2.9.4.0.7: 1. Update from binutils 1999 0710. A weak symbol bug http://egcs.cygnus.com/ml/egcs-bugs/1999-07/msg00129.html is fixed. Changes from binutils 2.9.4.0.6: 1. Update from binutils 1999 0626. Changes from binutils 2.9.4.0.5: 1. Update from binutils 1999 0620. 2. Remove my fwait fix and use the one in cvs. 3. Use "--only-section=section" instead of "--extract-section=section". for objcopy. Changes from binutils 2.9.4.0.4: 1. Update from binutils 1999 0612. 2. Remove various temporary fixes of mine since those bugs are fixed now. Changes from binutils 2.9.4.0.3: 1. Update from binutils 1999 0611. 2. Remove my ELF/Alpha bfd changes. 3. Use the local symbol copy fix in binutils 1999 0611. Changes from binutils 2.9.4.0.2: 1. Update from binutils 1999 0607. 2. Remove my Sparc hacks. 3. Fix local symbol copy. Changes from binutils 2.9.4.0.1: 1. Update from binutils 1999 0606. 2. Restore relocation overflow checking in binutils 2.9.1.0.25 so that Linux kernel can build. 3. Fix i370 for the new gas. Changes from binutils 1999 0605: 1. Fix a -Bsymbolic bug for Linux/alpha. 2. Add ELF/i370. 3. Fix 8/16-bit relocations for i386. 4. Add --redefine-sym=old_form=new_form to objcopy. 5. Add "-j section" for objcopy. 6. Fix i386 disassembler for fwait. 7. Fix a Sparc asm bug. 8. Add Ada demangle support. 9. Fix MIPS/ELF bugs. 10. Add some vxworks suppport. 11. Fix a.out assembler. The file list: 1. binutils-2.9.5.0.35.tar.gz. Source code. 2. binutils-2.9.5.0.34-2.9.5.0.35.diff.gz. Patch against the previous beta source code. 3. binutils-2.9.5.0.35-1.i386.rpm. IA-32 binary RPM for RedHat 6.1. There is no separate source rpm. You can do # rpm -ta binutils-2.9.5.0.35.tar.gz to create both binary and source rpms. The primary ftp sites for the beta Linux binutils are: 1. ftp://ftp.valinux.com/pub/support/hjl/binutils Thanks. H.J. Lu hjl@lucon.org 04/12/2000 From drepper@redhat.com Wed Apr 12 13:56:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Wed, 12 Apr 2000 13:56:00 -0000 Subject: Some patches for new clock functions References: Message-ID: Andreas Jaeger writes: > I got some warnings when compiling and fixed them: > - Fixed some typos > - We weren't always setting retval > - memmem needs I checked the patch in but with a few changes. The reason the return value was undefined was that I wanted to initialize the variable at the beginning. I somehow managed to forget to make this change. Thanks, -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From aj@oss.sgi.com Wed Apr 12 14:13:00 2000 From: aj@oss.sgi.com (Andreas Jaeger) Date: Wed, 12 Apr 2000 14:13:00 -0000 Subject: -ffast-math and mathinlines.h Message-ID: on ix86 contains a number of inline functions which are either inaccurate or don't set errno. gcc has a special flag for this case, it's called -ffast-math. The documentation is: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @item -ffast-math This option allows GCC to violate some ANSI or IEEE rules and/or specifications in the interest of optimizing code for speed. For example, it allows the compiler to assume arguments to the @code{sqrt} function are non-negative numbers and that no floating-point values are NaNs. This option should never be turned on by any @samp{-O} option since it can result in incorrect output for programs which depend on an exact implementation of IEEE or ANSI rules/specifications for math functions. @item -fno-math-errno Do not set ERRNO after calling math functions that are executed with a single instruction, e.g., sqrt. A program that relies on IEEE exceptions for math error handling may want to use this flag for speed while maintaining IEEE arithmetic compatibility. The default is @samp{-fmath-errno}. The @samp{-ffast-math} option sets @samp{-fno-math-errno}. @end table ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gcc defines __FAST_MATH__ if -ffast-math is set. IMO we should add a check in and only enable the inline instructions if __FAST_MATH__ is set. Here's a patch for glibc 2.2 - the patch shouldn't go into glibc 2.1 since we're changing the behaviour. I'm not sure it the patch is correct with regard of my change of __LIBC_INTERNAL_MATH_INLINES I don't know what kind of inline functions other architectures use - if those are violating IEEE/ISO C, we should use __FAST_MATH__ there also. Andreas 2000-04-12 Andreas Jaeger * sysdeps/i386/fpu/bits/mathinline.h: Define inline functions only if -ffast-math is given. ============================================================ Index: sysdeps/i386/fpu/bits/mathinline.h --- sysdeps/i386/fpu/bits/mathinline.h 2000/03/29 03:45:53 1.38 +++ sysdeps/i386/fpu/bits/mathinline.h 2000/04/12 21:06:18 @@ -141,7 +141,7 @@ #if __GNUC_PREREQ (2, 8) #if ((!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \ - && defined __OPTIMIZE__) + && defined __OPTIMIZE__ && defined __FAST_MATH__) /* A macro to define float, double, and long double versions of various math functions for the ix87 FPU. FUNC is the function name (which will @@ -275,7 +275,7 @@ #endif -#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ +#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ && defined __FAST_MATH__ /* Miscellaneous functions */ __inline_mathcode (__sgn, __x, \ @@ -711,11 +711,11 @@ #undef __atan2_code #undef __sincos_code -#endif /* __NO_MATH_INLINES */ +#endif /* __NO_MATH_INLINES && __OPTIMIZE && __FAST_MATH__ */ /* This code is used internally in the GNU libc. */ -#ifdef __LIBC_INTERNAL_MATH_INLINES +#if defined __LIBC_INTERNAL_MATH_INLINES && defined __FAST_MATH__ __inline_mathop (__ieee754_sqrt, "fsqrt") __inline_mathcode2 (__ieee754_atan2, __y, __x, register long double __value; -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de currently: aj@oss.sgi.com From aj@oss.sgi.com Thu Apr 13 12:38:00 2000 From: aj@oss.sgi.com (Andreas Jaeger) Date: Thu, 13 Apr 2000 12:38:00 -0000 Subject: syscalls question Message-ID: sysdeps/unix/sysv/linux/syscalls.list contains a definition for pipe. But for mips we do need the file from sysdeps/unix/mips/pipe.S instead. What's the proper way to fix this? We could move the pipe line to the linux specific architecture files. But is there a more elegant way of doing it? Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de currently: aj@oss.sgi.com From drepper@redhat.com Thu Apr 13 12:50:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Thu, 13 Apr 2000 12:50:00 -0000 Subject: syscalls question References: Message-ID: Andreas Jaeger writes: > sysdeps/unix/sysv/linux/syscalls.list contains a definition for pipe. > But for mips we do need the file from sysdeps/unix/mips/pipe.S > instead. What's the proper way to fix this? We could move the pipe > line to the linux specific architecture files. But is there a more > elegant way of doing it? This would be a bigger change than needed. Simply put #include in sysdeps/unix/sysv/linux/mips/pipe.S -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From aj@oss.sgi.com Thu Apr 13 12:52:00 2000 From: aj@oss.sgi.com (Andreas Jaeger) Date: Thu, 13 Apr 2000 12:52:00 -0000 Subject: syscalls question References: Message-ID: <20000413125228.C30698@oss.sgi.com> On Thu, Apr 13, 2000 at 12:47:50PM -0700, Ulrich Drepper wrote: > Andreas Jaeger writes: > > > sysdeps/unix/sysv/linux/syscalls.list contains a definition for pipe. > > But for mips we do need the file from sysdeps/unix/mips/pipe.S > > instead. What's the proper way to fix this? We could move the pipe > > line to the linux specific architecture files. But is there a more > > elegant way of doing it? > > This would be a bigger change than needed. Simply put > > #include > > in > > sysdeps/unix/sysv/linux/mips/pipe.S Thanks, I'll do that. Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de currently: aj@oss.sgi.com From aj@oss.sgi.com Fri Apr 14 10:45:00 2000 From: aj@oss.sgi.com (Andreas Jaeger) Date: Fri, 14 Apr 2000 10:45:00 -0000 Subject: Fix shlib-versions for mips-linux Message-ID: I encountered the problem that the versioned symbols from libc.so, ld.so, linuxthreads and libdl.so didn't match in the presence of weak symbols which are overwritten in another library for mips-linux. The appended patch should fix these problems (I've also changed libm). I'll give it real testing later on and will only then commit it. Is there a better way to do this? Roland and Ulrich, you'll might face similiar problems with Hurd and ia64-linux. Andreas For linuxthreads: 2000-04-14 Andreas Jaeger * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and 2.2 for linuxthreads. 2000-04-14 Andreas Jaeger * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and 2.2 for libdl, ld and libm. --- libc-clean/shlib-versions Mon Mar 27 21:35:08 2000 +++ glibc-2.2/shlib-versions Fri Apr 14 08:47:47 2000 @@ -23,6 +23,7 @@ alpha.*-.*-linux.* libm=6.1 alpha.*-.*-.* libm=6 powerpc-.*-.* libm=6 +mips.*-.*-linux.* libm=6 GLIBC_2.0 GLIBC_2.2 mips.*-.*-.* libm=6 arm.*-.*-.* libm=6 ia64-.*-.* libm=6 GLIBC_2.2 @@ -54,11 +55,13 @@ alpha.*-.*-linux.* ld=ld-linux.so.2 arm.*-.*-linux.* ld=ld-linux.so.2 ia64-.*-linux.* ld=ld-linux.so.2 GLIBC_2.2 +mips.*-.*-linux.* ld=ld.so.1 GLIBC_2.0 GLIBC_2.2 # We use the ELF ABI standard name for the default. .*-.*-.* ld=ld.so.1 # The -ldl interface (see ) is the same on all platforms. alpha.*-.*-linux.* libdl=2.1 +mips.*-.*-linux.* libdl=2 GLIBC_2.0 GLIBC_2.2 .*-.*-.* libdl=2 # So far the -lutil interface is the same on all platforms, except for the --- libc-clean/linuxthreads/shlib-versions Wed Mar 11 04:42:22 1998 +++ glibc-2.2/linuxthreads/shlib-versions Fri Apr 14 08:55:17 2000 @@ -1,2 +1,3 @@ # Xavier Leroy's Linux clone based thread library. +mips.*-.*-linux.* libpthread=0 GLIBC_2.0 GLIBC_2.2 .*-.*-linux.* libpthread=0 -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de currently: aj@oss.sgi.com From aj@oss.sgi.com Fri Apr 14 11:38:00 2000 From: aj@oss.sgi.com (Andreas Jaeger) Date: Fri, 14 Apr 2000 11:38:00 -0000 Subject: Patch for SHMFS_SUPER_MAGIC Message-ID: Linux pre6-3 contains a fix for statfs on shmfs so that we can use it now. I propose the appended patch. I don't know if links work with that filesystem and therefore didn't add anything to pathconf and fpathconf. Andreas 2000-04-14 Andreas Jaeger * sysdeps/unix/sysv/linux/shm_open.c: Include linux_fsinfo for SHMFS_SUPER_MAGIC. Remove definition of SHMFS_SUPER_MAGIC. * sysdeps/unix/sysv/linux/linux_fsinfo.h (SHMFS_SUPER_MAGIC): Added. ============================================================ Index: sysdeps/unix/sysv/linux/shm_open.c --- sysdeps/unix/sysv/linux/shm_open.c 2000/04/12 06:08:07 1.2 +++ sysdeps/unix/sysv/linux/shm_open.c 2000/04/14 18:29:33 @@ -27,13 +27,8 @@ #include #include #include +#include "linux_fsinfo.h" - -/* XXX Currently the Linux kernel sources do not define a super magic number - for the shmfs and the kernel assigns the value 0 to f_type. */ -#ifndef SHMFS_SUPER_MAGIC -# define SHMFS_SUPER_MAGIC 0 -#endif /* Mount point of the shared memory filesystem. */ static struct ============================================================ Index: sysdeps/unix/sysv/linux/linux_fsinfo.h --- sysdeps/unix/sysv/linux/linux_fsinfo.h 1999/11/18 16:41:21 1.5 +++ sysdeps/unix/sysv/linux/linux_fsinfo.h 2000/04/14 18:29:33 @@ -1,5 +1,5 @@ /* Constants from kernel header for various FSes. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000 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 @@ -97,6 +97,9 @@ /* Constants that identify the `xenix' filesystem. */ #define XENIX_SUPER_MAGIC 0x012ff7b4 + +/* Constant that identifies the `shm' filesystem. */ +#define SHMFS_SUPER_MAGIC 0x02011994 /* Maximum link counts. */ #define COH_LINK_MAX 10000 -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de currently: aj@oss.sgi.com From roland@frob.com Fri Apr 14 13:39:00 2000 From: roland@frob.com (Roland McGrath) Date: Fri, 14 Apr 2000 13:39:00 -0000 Subject: Fix shlib-versions for mips-linux References: Message-ID: <200004142039.QAA12116@frob.com> It seems to me that the ideal would be to have symbols that get defined in multiple libraries be listed in a Versions file only once in one place. That is, one library would be the "ABI definer" (let's say libc is) and other libraries overriding those symbols would be bound by the same version crapola as the ABI definer. Off hand, I think the simplest way to do this would be to just throw all the symbols into a single version script without regard to library and essentially use the one version script for all libraries. That should work because excess symbols in a version script file are just ignored by ld -shared. However, it is probably fraught with subtle perils. Another approach would be more magic crunching to apply the version-reassigned symbols from one map to all the others. From drepper@redhat.com Fri Apr 14 13:46:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Fri, 14 Apr 2000 13:46:00 -0000 Subject: Fix shlib-versions for mips-linux References: <200004142039.QAA12116@frob.com> Message-ID: I don't like throwing everything together. It might also not be right in all situations since you very well can have functions with the same name in different libraries, one exported, the other not. I also don't think that this is a problem so hard to detect that major reorganizations are appropriate. You will find the problems quite easily since something simply will not run. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From roland@frob.com Fri Apr 14 13:54:00 2000 From: roland@frob.com (Roland McGrath) Date: Fri, 14 Apr 2000 13:54:00 -0000 Subject: Fix shlib-versions for mips-linux References: Message-ID: <200004142054.QAA12321@frob.com> > I don't like throwing everything together. It might also not be right > in all situations since you very well can have functions with the same > name in different libraries, one exported, the other not. Indeed; this is the sort of "subtle peril" I had in mind. I think it's the case that we don't have any such issues at the moment, but it would surely be confusing when they came up in the future. > I also don't think that this is a problem so hard to detect that major > reorganizations are appropriate. You will find the problems quite > easily since something simply will not run. Well, the failure mode is going to be failing to override functions and so e.g. getting the libc stub for flockfile when libpthread is in fact linked in. That could be a bitch. But I agree with the principle that this is detectable. It should be straightforward to add a test that flags any suspect cases after the shlibs are all built. (A suspect case would be a given symbol that is defined in multiple libraries where the sets of versions available from each library do not all exactly match.) From roland@frob.com Fri Apr 14 13:57:00 2000 From: roland@frob.com (Roland McGrath) Date: Fri, 14 Apr 2000 13:57:00 -0000 Subject: Fix shlib-versions for mips-linux References: <200004142054.QAA12321@frob.com> Message-ID: <200004142057.QAA12359@frob.com> OTOH, it is a pain to have to add many platform-specific lines to shlib-versions for each lib that overrides a libc symbol. So I would be a bit inclined toward the automagic transmogrification approach. But, you all know my penchant for the frobbity. From drepper@redhat.com Fri Apr 14 14:04:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Fri, 14 Apr 2000 14:04:00 -0000 Subject: Fix shlib-versions for mips-linux References: <200004142054.QAA12321@frob.com> Message-ID: Roland McGrath writes: > It should be straightforward to add a test that flags any suspect cases > after the shlibs are all built. (A suspect case would be a given symbol > that is defined in multiple libraries where the sets of versions available > from each library do not all exactly match.) Yes, would be nice to have a tool to analyze the binaries afterwards. Beside doing this you can examine that every interface (the functions in the public headers) is exported and probably many other things. I don't think I have time to write a framework for this anytime soon. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From aj@oss.sgi.com Fri Apr 14 15:39:00 2000 From: aj@oss.sgi.com (Andreas Jaeger) Date: Fri, 14 Apr 2000 15:39:00 -0000 Subject: Fix shlib-versions for mips-linux References: <200004142039.QAA12116@frob.com> Message-ID: <20000414153915.F12388@oss.sgi.com> I'll commit my proposed patch now since it fixed my problems. If somebody comes up with a cleaner way to do this, we can always do it. Some kind of testing stuff would really be fine. Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de currently: aj@oss.sgi.com From drepper@redhat.com Fri Apr 14 16:57:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Fri, 14 Apr 2000 16:57:00 -0000 Subject: Fix shlib-versions for mips-linux References: <200004142039.QAA12116@frob.com> <20000414153915.F12388@oss.sgi.com> Message-ID: Andreas Jaeger writes: > I'll commit my proposed patch now since it fixed my problems. If somebody > comes up with a cleaner way to do this, we can always do it. Some kind of > testing stuff would really be fine. THe patch is OK. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Sat Apr 15 12:21:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Sat, 15 Apr 2000 12:21:00 -0000 Subject: Patch for SHMFS_SUPER_MAGIC References: Message-ID: Andreas Jaeger writes: > Linux pre6-3 contains a fix for statfs on shmfs so that we can use it > now. OK, I've applied the patch. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Sat Apr 15 13:55:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Sat, 15 Apr 2000 13:55:00 -0000 Subject: -ffast-math and mathinlines.h References: Message-ID: I have generally no problem with this but the granularity of the patch is not OK. The -ffast-math flag should only enable additional function which really behave differently then the libm functions. Looking briefly through the mathinline.h file this at least excludes lrintf lrint lrintl llrintf llrint llrintl finite Perhaps ldexpf ldexp ldexpl -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Sat Apr 15 16:37:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Sat, 15 Apr 2000 16:37:00 -0000 Subject: command line limitation Message-ID: When I reported some days back that with bash 2.04 I wouldn't see limitation this wasn't true. I still get: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cat csu/Versions assert/Versions ctype/Versions locale/Versions intl/Versions catgets/Versions math/Versions setjmp/Versions signal/Versions stdlib/Versions stdio-common/Versions libio/Versions malloc/Versions string/Versions wcsmbs/Versions time/Versions dirent/Versions grp/Versions pwd/Versions posix/Versions io/Versions termios/Versions resource/Versions misc/Versions socket/Versions sysvipc/Versions gmon/Versions iconv/Versions wctype/Versions shadow/Versions argp/Versions crypt/Versions linuxthreads/Versions nss/Versions rt/Versions debug/Versions linuxthreads_db/Versions inet/Versions resolv/Versions hesiod/Versions sunrpc/Versions nis/Versions streams/Versions login/Versions dlfcn/Versions elf/Versions sysdeps/unix/sysv/linux/i386/Versions sysdeps/unix/sysv/linux/Versions sysdeps/unix/sysv/Versions sysdeps/i386/i486/Versions sysdeps/i386/Versions \ | sed 's/#.*$//;s/^[ ]*%/#/' | gcc -E -undef -I/work/glibc-builds/20000415 -Iinclude -include /work/glibc-builds/20000415/config.h -x c - | sed 's/#.*$//;/^[ ]*$/d' \ | LC_ALL=C gawk -v buildroot=/work/glibc-builds/20000415/ -v defsfile=/work/glibc-builds/20000415/Versions.all \ -v move_if_change='/bin/sh scripts/move-if-change' \ -f scripts/versions.awk >> /work/glibc-builds/20000415/sysd-versionsT : file is too large (>12288 bytes) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I'm not even sure anymore whether this comes from bash or not. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From aj@oss.sgi.com Sat Apr 15 18:40:00 2000 From: aj@oss.sgi.com (Andreas Jaeger) Date: Sat, 15 Apr 2000 18:40:00 -0000 Subject: -ffast-math and mathinlines.h References: Message-ID: <20000415184025.C20435@oss.sgi.com> On Sat, Apr 15, 2000 at 01:53:33PM -0700, Ulrich Drepper wrote: > I have generally no problem with this but the granularity of the patch > is not OK. The -ffast-math flag should only enable additional > function which really behave differently then the libm functions. > > Looking briefly through the mathinline.h file this at least excludes > > lrintf > lrint > lrintl > llrintf > llrint > llrintl > finite > > Perhaps > ldexpf > ldexp > ldexpl Ok, I'll prepare a patch later. Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de currently: aj@oss.sgi.com From aj@oss.sgi.com Sat Apr 15 19:17:00 2000 From: aj@oss.sgi.com (Andreas Jaeger) Date: Sat, 15 Apr 2000 19:17:00 -0000 Subject: command line limitation Message-ID: <20000415191645.A20571@oss.sgi.com> Hi Uli, > [...] > : file is too large (>12288 bytes) > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > I'm not even sure anymore whether this comes from bash or not. I had the same problem at the end of March and it looked like a bug in cpp. The messages comes AFAIK from cpp and not from bash. I can't reproduce this with the current gcc anymore. Btw. I'm running bash 2.04 without problems. Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de currently: aj@oss.sgi.com From drepper@redhat.com Sat Apr 15 20:05:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Sat, 15 Apr 2000 20:05:00 -0000 Subject: command line limitation References: Message-ID: Greg McGary writes: > It comes from _cpp_read_and_prescan in gcc/cpplex.c Ah. Zack, you're listening? > The comments claim that memory is allocated on demand up to 1/2 the > address space of the machine, but that's hardly the case here. Definitely not. :-) -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From kukuk@suse.de Mon Apr 17 07:13:00 2000 From: kukuk@suse.de (Thorsten Kukuk) Date: Mon, 17 Apr 2000 07:13:00 -0000 Subject: Patch for glibc 2.2/SPARC32 Message-ID: <20000417161311.A31587@Wotan.suse.de> Hi, the following is necessary to compile glibc 2.2 cvs on SPARC32. In the moment all math tests and tst-efgcvt fails and you get a lot of bus erros, if you run make check in the localedata directory. Thorsten 2000-04-17 Thorsten Kukuk * sysdeps/unix/sysv/linux/sparc/sparc32/Makefile: Remove setresgid and setresuid frm sysdep_routines. --- sysdeps/unix/sysv/linux/sparc/sparc32/Makefile +++ sysdeps/unix/sysv/linux/sparc/sparc32/Makefile 2000/04/11 14:51:45 @@ -2,7 +2,7 @@ ASFLAGS-.os += -fPIC ifeq ($(subdir),misc) -sysdep_routines += setfsgid setfsuid setresgid setresuid +sysdep_routines += setfsgid setfsuid endif # When I get this to work, this is the right thing -- Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de SuSE GmbH Schanzaeckerstr. 10 90443 Nuernberg Linux is like a Vorlon. It is incredibly powerful, gives terse, cryptic answers and has a lot of things going on in the background. From jakub@redhat.com Mon Apr 17 07:20:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Mon, 17 Apr 2000 07:20:00 -0000 Subject: [PATCH] sparc*-linux Makefiles Message-ID: <20000417162454.R607@sunsite.ms.mff.cuni.cz> Hi! Although glibc does not normally use $(LD), so add-ons do, so it is good to have that variable set to a usable value. Also, -fcall-used-g7 is linux specific. 2000-04-15 Jakub Jelinek * sysdeps/sparc/sparc64/Makefile: Remove sysdep-CFLAGS modification and move it... * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: ...here. Add -melf64_sparc switch to $(LD) on sparc64-linux. * sysdeps/unix/sysv/linux/sparc/sparc32/Makefile: Add -melf32_sparc switch to $(LD) on sparc-linux. --- libc/sysdeps/sparc/sparc64/Makefile.jj Tue Jan 4 17:11:59 2000 +++ libc/sysdeps/sparc/sparc64/Makefile Sat Apr 15 11:06:22 2000 @@ -1,3 +1,2 @@ # The Sparc `long double' is a distinct type we support. long-double-fcts = yes -sysdep-CFLAGS += -fcall-used-g7 --- libc/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile.jj Tue Jan 4 17:12:06 2000 +++ libc/sysdeps/unix/sysv/linux/sparc/sparc32/Makefile Sat Apr 15 11:10:05 2000 @@ -1,5 +1,6 @@ asm-CPPFLAGS = -D__ASSEMBLY__ ASFLAGS-.os += -fPIC +LD := $(LD) -melf32_sparc ifeq ($(subdir),misc) sysdep_routines += setfsgid setfsuid setresgid setresuid --- libc/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile.jj Sat Apr 15 11:40:33 2000 +++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/Makefile Sat Apr 15 11:07:16 2000 @@ -0,0 +1,2 @@ +sysdep-CFLAGS += -fcall-used-g7 +LD := $(LD) -melf64_sparc Jakub From jakub@redhat.com Mon Apr 17 07:21:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Mon, 17 Apr 2000 07:21:00 -0000 Subject: [PATCH] ldbl128 printf_fphex.c fix Message-ID: <20000417162607.S607@sunsite.ms.mff.cuni.cz> Hi! This has been broken for a while, I just saw it in the warnings. ldbl96 has been changed in February. 2000-04-17 Jakub Jelinek * sysdeps/ieee754/ldbl-128/printf_fphex.c (PRINT_FPHEX_LONG_DOUBLE): Create wnumstr as well as numstr to support wide character output correctly. --- libc/sysdeps/ieee754/ldbl-128/printf_fphex.c.jj Fri Nov 12 16:30:31 1999 +++ libc/sysdeps/ieee754/ldbl-128/printf_fphex.c Mon Apr 17 12:21:12 2000 @@ -1,6 +1,6 @@ /* Print floating point number in hexadecimal notation according to ISO C99. - Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999, 2000 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 @@ -36,23 +36,43 @@ do { \ zero_mantissa = (num0|num1) == 0; \ \ if (sizeof (unsigned long int) > 6) \ - numstr = _itoa_word (num1, numbuf + sizeof numbuf, 16, \ - info->spec == 'A'); \ + { \ + numstr = _itoa_word (num1, numbuf + sizeof numbuf, 16, \ + info->spec == 'A'); \ + wnumstr = _itowa_word (num1, wnumbuf + sizeof wnumbuf, 16, \ + info->spec == 'A'); \ + } \ else \ - numstr = _itoa (num1, numbuf + sizeof numbuf, 16, \ - info->spec == 'A'); \ + { \ + numstr = _itoa (num1, numbuf + sizeof numbuf, 16, \ + info->spec == 'A'); \ + wnumstr = _itowa (num1, wnumbuf + sizeof wnumbuf, 16, \ + info->spec == 'A'); \ + } \ \ while (numstr > numbuf + (sizeof numbuf - 64 / 4)) \ - *--numstr = '0'; \ + { \ + *--numstr = '0'; \ + *--wnumstr = L'0'; \ + } \ \ if (sizeof (unsigned long int) > 6) \ - numstr = _itoa_word (num0, numstr, 16, info->spec == 'A'); \ + { \ + numstr = _itoa_word (num0, numstr, 16, info->spec == 'A'); \ + wnumstr = _itowa_word (num0, wnumstr, 16, info->spec == 'A'); \ + } \ else \ - numstr = _itoa (num0, numstr, 16, info->spec == 'A'); \ + { \ + numstr = _itoa (num0, numstr, 16, info->spec == 'A'); \ + wnumstr = _itowa (num0, wnumstr, 16, info->spec == 'A'); \ + } \ \ /* Fill with zeroes. */ \ while (numstr > numbuf + (sizeof numbuf - 112 / 4)) \ - *--numstr = '0'; \ + { \ + *--numstr = '0'; \ + *--wnumstr = L'0'; \ + } \ \ leading = fpnum.ldbl.ieee.exponent == 0 ? '0' : '1'; \ \ Jakub From jakub@redhat.com Mon Apr 17 07:23:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Mon, 17 Apr 2000 07:23:00 -0000 Subject: [PATCH] membar for sparc64 Message-ID: <20000417162734.T607@sunsite.ms.mff.cuni.cz> Hi! >From what I saw in spinlock.c, you do not expect only the Store->Store barrier but Load->Load as well. 2000-04-17 Jakub Jelinek * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Make sure all stores before MEMORY_BARRIER complete before all stores after it and similarly with loads. --- libc/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h.jj Thu Apr 13 09:25:32 2000 +++ libc/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h Mon Apr 17 12:43:34 2000 @@ -37,10 +37,9 @@ testandset (int *spinlock) } -/* Memory barrier; default is to do nothing */ -/* FIXME: is stbar OK, or should we use the more general membar instruction? - If so, which mode to pass to membar? */ -#define MEMORY_BARRIER() __asm__ __volatile__("stbar" : : : "memory") +/* Memory barrier; guarantee stores before this are completed before new stores + and similarly with loads. */ +#define MEMORY_BARRIER() __asm__ __volatile__("membar 9" : : : "memory") /* Get some notion of the current stack. Need not be exactly the top Jakub From jakub@redhat.com Mon Apr 17 07:25:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Mon, 17 Apr 2000 07:25:00 -0000 Subject: Patch for glibc 2.2/SPARC32 References: <20000417161311.A31587@Wotan.suse.de> Message-ID: <20000417163009.U607@sunsite.ms.mff.cuni.cz> On Mon, Apr 17, 2000 at 04:13:11PM +0200, Thorsten Kukuk wrote: > > Hi, > > the following is necessary to compile glibc 2.2 cvs on SPARC32. Ok. > > In the moment all math tests and tst-efgcvt fails and you get > a lot of bus erros, if you run make check in the localedata > directory. Really all math tests and not only some? I'll try soon. The tests are not tuned for SPARC, but some of the tests used to work just fine. I also get some locale related SIGBUSes, I'll try to debug it once I rebootstrap the compiler with some fixes. Jakub From drepper@redhat.com Mon Apr 17 11:14:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 17 Apr 2000 11:14:00 -0000 Subject: utmpd Message-ID: I'm inclinded to remove this program. It was of questionable usefulness for 2.1 and I think we can argue that with 2.2 people should have updated their programs. Anybody disagree? -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From aj@oss.sgi.com Mon Apr 17 11:36:00 2000 From: aj@oss.sgi.com (Andreas Jaeger) Date: Mon, 17 Apr 2000 11:36:00 -0000 Subject: -ffast-math and mathinlines.h References: Message-ID: >>>>> Ulrich Drepper writes: > I have generally no problem with this but the granularity of the patch > is not OK. The -ffast-math flag should only enable additional > function which really behave differently then the libm functions. > Looking briefly through the mathinline.h file this at least excludes > lrintf > lrint > lrintl > llrintf > llrint > llrintl > finite > Perhaps > ldexpf > ldexp > ldexpl Here's a patch for mathinline and the documentation. Jakub, could you check whether sysdeps/sparc/fpu/bits/mathinline also needs some #ifdef __FAST_MATH__ ? Thanks, Andreas 2000-04-15 Andreas Jaeger * manual/math.texi (FP Function Optimizations): Document gcc -ffast-math behaviour with mathinlines. * sysdeps/i386/fpu/bits/mathinline.h: Only use save inline functions unless -ffast-math is given to gcc. --- libc-clean/sysdeps/i386/fpu/bits/mathinline.h Tue Mar 28 22:16:56 2000 +++ glibc-2.2/sysdeps/i386/fpu/bits/mathinline.h Sat Apr 15 20:00:22 2000 @@ -281,6 +281,8 @@ __inline_mathcode (__sgn, __x, \ return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0)) +/* __FAST_MATH__ is defined by gcc -ffast-math. */ +#ifdef __FAST_MATH__ __inline_mathcode (__pow2, __x, \ register long double __value; \ register long double __exponent; \ @@ -474,7 +476,8 @@ __inline_mathopNP (sqrt, "fsqrt") __inline_mathopNP_ (long double, __sqrtl, "fsqrt") - +#endif /* __FAST_MATH__ */ + #if __GNUC_PREREQ (2, 8) __inline_mathcodeNP_ (double, fabs, __x, return __builtin_fabs (__x)) __inline_mathcodeNP_ (float, fabsf, __x, return __builtin_fabsf (__x)) @@ -485,6 +488,7 @@ __inline_mathop_ (long double, __fabsl, "fabs") #endif +#ifdef __FAST_MATH__ /* The argument range of this inline version is reduced. */ __inline_mathopNP (sin, "fsin") /* The argument range of this inline version is reduced. */ @@ -540,7 +544,8 @@ __asm __volatile ("frndint" : "=t" (__value) : "0" (__x)); \ __asm __volatile ("fldcw %0" : : "m" (__cw)); \ return __value) - +#endif /* __FAST_MATH__ */ + #define __ldexp_code \ register long double __value; \ __asm __volatile__ \ @@ -557,7 +562,7 @@ /* Optimized versions for some non-standardized functions. */ #if defined __USE_ISOC99 || defined __USE_MISC - +#ifdef __FAST_MATH__ __inline_mathcodeNP (expm1, __x, __expm1_code) /* We cannot rely on M_SQRT being defined. So we do it for ourself @@ -600,11 +605,13 @@ ("fxtract\n\t" \ : "=t" (__junk), "=u" (__value) : "0" (__x)); \ return __value) - +#endif /* __FAST_MATH__ */ #endif #ifdef __USE_ISOC99 +#ifdef __FAST_MATH__ __inline_mathop_declNP (log2, "fld1; fxch; fyl2x", "0" (__x) : "st(1)") +#endif /* __FAST_MATH__ */ __MATH_INLINE float ldexpf (float __x, int __y) @@ -618,9 +625,11 @@ __ldexp_code; } +#ifdef __FAST_MATH__ __inline_mathcodeNP3 (fma, __x, __y, __z, return (__x * __y) + __z) __inline_mathopNP (rint, "frndint") +#endif /* __FAST_MATH__ */ #define __lrint_code \ long int __lrintres; \ @@ -672,7 +681,7 @@ #ifdef __USE_MISC - +#ifdef __FAST_MATH__ __inline_mathcodeNP2 (drem, __x, __y, \ register double __value; \ register int __clobbered; \ @@ -683,6 +692,7 @@ "jp 1b" \ : "=t" (__value), "=&a" (__clobbered) : "0" (__x), "u" (__y) : "cc"); \ return __value) +#endif /* __FAST_MATH__ */ /* This function is used in the `isfinite' macro. */ @@ -695,23 +705,24 @@ } /* Miscellaneous functions */ - +#ifdef __FAST_MATH__ __inline_mathcode (__coshm1, __x, \ register long double __exm1 = __expm1l (__fabsl (__x)); \ return 0.5 * (__exm1 / (__exm1 + 1.0)) * __exm1) __inline_mathcode (__acosh1p, __x, \ return log1pl (__x + __sqrtl (__x) * __sqrtl (__x + 2.0))) - +#endif /* __FAST_MATH__ */ #endif /* __USE_MISC */ /* Undefine some of the large macros which are not used anymore. */ +#ifdef __FAST_MATH__ #undef __expm1_code #undef __exp_code #undef __atan2_code #undef __sincos_code - -#endif /* __NO_MATH_INLINES */ +#endif /* __FAST_MATH__ */ +#endif /* __NO_MATH_INLINES && __OPTIMIZE */ /* This code is used internally in the GNU libc. */ --- libc-clean/manual/math.texi Sun Oct 31 09:19:58 1999 +++ glibc-2.2/manual/math.texi Sat Apr 15 20:09:59 2000 @@ -1770,9 +1770,10 @@ can increase the speed of generated code significantly. The drawback is that code size will increase, and the increase is not always negligible. -The speed increase has one drawback: the inline functions might not set -@code{errno} and might not have the same precission as the library -functions. +There are two kind of inline functions: Those that give the same result +as the library functions and others that might not set @code{errno} and +might not have the same precission as the library functions. The latter +are only available if the flag @code{-ffast-math} is given to GNU CC. In cases where the inline functions and macros are not wanted the symbol @code{__NO_MATH_INLINES} should be defined before any system header is -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de currently: aj@oss.sgi.com From jakub@redhat.com Mon Apr 17 14:07:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Mon, 17 Apr 2000 14:07:00 -0000 Subject: [PATCH] Makefile fix for ldconfig Message-ID: <20000417231206.Y607@sunsite.ms.mff.cuni.cz> Hi! When doing make install with non-empty install_root, ldconfig fails because it chroots into install_root and then tries to look up slibdir and libdir with install_root prefix. 2000-04-17 Jakub Jelinek * Makefile (install): Use slibdir and libdir instead of inst_slibdir and inst_libdir. --- libc/Makefile.jj Mon Apr 17 22:47:49 2000 +++ libc/Makefile Mon Apr 17 22:56:42 2000 @@ -107,7 +107,7 @@ install-symbolic-link: subdir_install install: -test ! -x $(common-objpfx)elf/ldconfig || \ $(common-objpfx)elf/ldconfig $(addprefix -r ,$(install_root)) \ - $(inst_slibdir) $(inst_libdir) + $(slibdir) $(libdir) ifneq (no,$(PERL)) ifeq (/usr,$(prefix)) ifeq (,$(install_root)) Jakub From aj@oss.sgi.com Mon Apr 17 16:39:00 2000 From: aj@oss.sgi.com (Andreas Jaeger) Date: Mon, 17 Apr 2000 16:39:00 -0000 Subject: LD_DEBUG=help message Message-ID: I'd like to have statistics displayed. Here's a patch. Ok, to commit? Andreas 2000-04-17 Andreas Jaeger * elf/rtld.c (process_dl_debug): Mention statistics in help message. ============================================================ Index: elf/rtld.c --- elf/rtld.c 2000/04/17 15:05:44 1.162 +++ elf/rtld.c 2000/04/17 23:38:53 @@ -1180,13 +1180,14 @@ _dl_sysdep_message ("\ Valid options for the LD_DEBUG environment variable are:\n\ \n\ - bindings display information about symbol binding\n\ - files display processing of files and libraries\n\ - help display this help message and exit\n\ - libs display library search paths\n\ - reloc display relocation processing\n\ - symbols display symbol table processing\n\ - versions display version dependencies\n\ + bindings display information about symbol binding\n\ + files display processing of files and libraries\n\ + help display this help message and exit\n\ + libs display library search paths\n\ + reloc display relocation processing\n\ + statistics display relocation statistics\n\ + symbols display symbol table processing\n\ + versions display version dependencies\n\ \n\ To direct the debugging output into a file instead of standard output\n\ a filename can be specified using the LD_DEBUG_OUTPUT environment variable.\n", -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de currently: aj@oss.sgi.com From aj@oss.sgi.com Mon Apr 17 19:14:00 2000 From: aj@oss.sgi.com (Andreas Jaeger) Date: Mon, 17 Apr 2000 19:14:00 -0000 Subject: -ffast-math and mathinlines.h References: Message-ID: >>>>> Andreas Jaeger writes: AJ> Here's a patch for mathinline and the documentation. AJ> Jakub, could you check whether sysdeps/sparc/fpu/bits/mathinline also AJ> needs some #ifdef __FAST_MATH__ ? The testsuite doesn't pass the math inline tests anymore with this patch. I don't know what's going on and will check it later. Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de currently: aj@oss.sgi.com From drepper@redhat.com Mon Apr 17 23:12:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 17 Apr 2000 23:12:00 -0000 Subject: Patch for glibc 2.2/SPARC32 References: <20000417161311.A31587@Wotan.suse.de> Message-ID: Thorsten Kukuk writes: > the following is necessary to compile glibc 2.2 cvs on SPARC32. Thanks, I've applied the patch. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Mon Apr 17 23:15:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 17 Apr 2000 23:15:00 -0000 Subject: [PATCH] sparc*-linux Makefiles References: <20000417162454.R607@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > Although glibc does not normally use $(LD), so add-ons do, so it is good to > have that variable set to a usable value. > Also, -fcall-used-g7 is linux specific. I've applied the patch. Thanks, -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Mon Apr 17 23:16:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 17 Apr 2000 23:16:00 -0000 Subject: [PATCH] ldbl128 printf_fphex.c fix References: <20000417162607.S607@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > This has been broken for a while, I just saw it in the warnings. ldbl96 has > been changed in February. Thanks, I've applied the patch. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Mon Apr 17 23:18:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 17 Apr 2000 23:18:00 -0000 Subject: [PATCH] membar for sparc64 References: <20000417162734.T607@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > 2000-04-17 Jakub Jelinek > > * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Make sure all > stores before MEMORY_BARRIER complete before all stores after it and > similarly with loads. Can you take a look at this again, now with the WRITE_MEMORY_BARRIERs in place? -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Mon Apr 17 23:25:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 17 Apr 2000 23:25:00 -0000 Subject: [PATCH] Makefile fix for ldconfig References: <20000417231206.Y607@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > When doing make install with non-empty install_root, ldconfig fails because > it chroots into install_root and then tries to look up slibdir and libdir > with install_root prefix. Thanks, I've applied the patch. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Mon Apr 17 23:32:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 17 Apr 2000 23:32:00 -0000 Subject: LD_DEBUG=help message References: Message-ID: Andreas Jaeger writes: > I'd like to have statistics displayed. Here's a patch. > > Ok, to commit? I've changed the patch slightly. We should document (in the help text) what is not implemented. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From jakub@redhat.com Mon Apr 17 23:50:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Mon, 17 Apr 2000 23:50:00 -0000 Subject: [PATCH] membar for sparc64 References: <20000417162734.T607@sunsite.ms.mff.cuni.cz> Message-ID: <20000418085451.A607@sunsite.ms.mff.cuni.cz> On Mon, Apr 17, 2000 at 11:16:36PM -0700, Ulrich Drepper wrote: > Jakub Jelinek writes: > > > 2000-04-17 Jakub Jelinek > > > > * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Make sure all > > stores before MEMORY_BARRIER complete before all stores after it and > > similarly with loads. > > Can you take a look at this again, now with the WRITE_MEMORY_BARRIERs > in place? stbar is deprecated and is doing something else (stbar is functionally equivalent to membar #StoreStore, ie. something like Alpha wmb). So, I've defined MEMORY_BARRIER to be something like Alpha mb and introduced READ_MEMORY_BARRIER which ensures Load->Load ordering. 2000-04-18 Jakub Jelinek * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar, not stbar. (READ_MEMORY_BARRIER): Define. * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not MEMORY_BARRIER. * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep headers. --- libc/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h.jj Tue Apr 18 08:13:13 2000 +++ libc/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h Tue Apr 18 08:36:56 2000 @@ -38,9 +38,11 @@ testandset (int *spinlock) /* Memory barrier; default is to do nothing */ -/* FIXME: is stbar OK, or should we use the more general membar instruction? - If so, which mode to pass to membar? */ -#define MEMORY_BARRIER() __asm__ __volatile__("stbar" : : : "memory") +#define MEMORY_BARRIER() \ + __asm__ __volatile__("membar #LoadLoad | #LoadStore | #StoreLoad | #StoreStore" : : : "memory") +/* Read barrier. */ +#define READ_MEMORY_BARRIER() \ + __asm__ __volatile__("membar #LoadLoad | #LoadStore" : : : "memory") /* Write barrier. */ #define WRITE_MEMORY_BARRIER() \ __asm__ __volatile__("membar #StoreLoad | #StoreStore" : : : "memory") --- libc/linuxthreads/spinlock.c.jj Tue Apr 18 08:13:13 2000 +++ libc/linuxthreads/spinlock.c Tue Apr 18 08:38:36 2000 @@ -122,12 +122,12 @@ again: several iterations of the while loop. Some processors (e.g. multiprocessor Alphas) could perform such reordering even though the loads are dependent. */ - MEMORY_BARRIER(); + READ_MEMORY_BARRIER(); thr = *ptr; } /* Prevent reordering of the load of lock->__status above and thr->p_nextlock below */ - MEMORY_BARRIER(); + READ_MEMORY_BARRIER(); /* Remove max prio thread from waiting list. */ if (maxptr == (pthread_descr *) &lock->__status) { /* If max prio thread is at head, remove it with compare-and-swap --- libc/linuxthreads/internals.h.jj Tue Apr 18 08:13:13 2000 +++ libc/linuxthreads/internals.h Tue Apr 18 08:38:02 2000 @@ -359,10 +359,13 @@ static inline pthread_descr thread_self /* If MEMORY_BARRIER isn't defined in pt-machine.h, assume the architecture doesn't need a memory barrier instruction (e.g. Intel x86). Some - architectures distinguish between normal/read and write barriers. */ + architectures distinguish between full, read and write barriers. */ #ifndef MEMORY_BARRIER #define MEMORY_BARRIER() +#endif +#ifndef READ_MEMORY_BARRIER +#define READ_MEMORY_BARRIER() MEMORY_BARRIER() #endif #ifndef WRITE_MEMORY_BARRIER #define WRITE_MEMORY_BARRIER() MEMORY_BARRIER() Jakub From drepper@redhat.com Tue Apr 18 00:35:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 18 Apr 2000 00:35:00 -0000 Subject: [PATCH] membar for sparc64 References: <20000417162734.T607@sunsite.ms.mff.cuni.cz> <20000418085451.A607@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > stbar is deprecated and is doing something else (stbar is functionally > equivalent to membar #StoreStore, ie. something like Alpha wmb). > So, I've defined MEMORY_BARRIER to be something like Alpha mb and introduced > READ_MEMORY_BARRIER which ensures Load->Load ordering. Thanks, I've added the patch. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From jakub@redhat.com Tue Apr 18 02:03:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Tue, 18 Apr 2000 02:03:00 -0000 Subject: [PATCH] One more sparc32 fix Message-ID: <20000418110740.B607@sunsite.ms.mff.cuni.cz> Hi! This just kills gcc warning, the typedef did not have any actual type name specified. 2000-04-18 Jakub Jelinek * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext): Remove the typedef keyword. --- libc/sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h.jj Wed Mar 29 16:07:30 2000 +++ libc/sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h Tue Apr 18 10:52:34 2000 @@ -30,7 +30,7 @@ This one is for the "new" style signals, which are now delivered unless SA_SIGINFO is requested. */ -typedef struct sigcontext +struct sigcontext { struct { Jakub From drepper@redhat.com Tue Apr 18 02:15:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 18 Apr 2000 02:15:00 -0000 Subject: [PATCH] One more sparc32 fix References: <20000418110740.B607@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > This just kills gcc warning, the typedef did not have any actual type name > specified. Applied. Thanks, -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From kettenis@wins.uva.nl Tue Apr 18 02:42:00 2000 From: kettenis@wins.uva.nl (Mark Kettenis) Date: Tue, 18 Apr 2000 02:42:00 -0000 Subject: -ffast-math and mathinlines.h References: Message-ID: <200004180942.LAA10414@landau.wins.uva.nl> From: Andreas Jaeger Date: 15 Apr 2000 21:53:34 -0700 --- libc-clean/manual/math.texi Sun Oct 31 09:19:58 1999 +++ glibc-2.2/manual/math.texi Sat Apr 15 20:09:59 2000 @@ -1770,9 +1770,10 @@ can increase the speed of generated code significantly. The drawback is that code size will increase, and the increase is not always negligible. -The speed increase has one drawback: the inline functions might not set -@code{errno} and might not have the same precission as the library -functions. +There are two kind of inline functions: Those that give the same result +as the library functions and others that might not set @code{errno} and +might not have the same precission as the library functions. The latter +are only available if the flag @code{-ffast-math} is given to GNU CC. Apart from the obvious misspelling (precission), the bit [Others that] might not have the same precision as the library functions. is a bit vague. This probably raises the question: what gives the best precision? Is there an easy answer to this? A cross-reference to the GCC manual would be nice too :-). Mark From kettenis@wins.uva.nl Tue Apr 18 03:17:00 2000 From: kettenis@wins.uva.nl (Mark Kettenis) Date: Tue, 18 Apr 2000 03:17:00 -0000 Subject: utmpd References: Message-ID: <200004181016.MAA10475@landau.wins.uva.nl> From: Ulrich Drepper Date: 17 Apr 2000 11:12:09 -0700 I'm inclinded to remove this program. It was of questionable usefulness for 2.1 and I think we can argue that with 2.2 people should have updated their programs. Anybody disagree? No, please remove it. I'm still thinking of re-writing utmpd. Its purpose would no longer be compatibility with libc5, but enabling non-suid programs to manipulate their own utmp entries. But this would probably need to be a complete rewrite, so removing the current code wouldn't be a problem at all (and the old code would still be in the CVS repository). You might want to leave in the hooks for utmpd in the library code, or at least the framework that makes it possible to add other backends. Mark From jakub@redhat.com Tue Apr 18 06:31:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Tue, 18 Apr 2000 06:31:00 -0000 Subject: [PATCH] Fix localedef, so that programs don't sigbus on SPARC Message-ID: <20000418153545.D607@sunsite.ms.mff.cuni.cz> Hi! The following is needed to get say ls run on sparc32 with e.g. LC_ALL=en_US. There were a few problems: missing alignments, CTYPE had one uninitialized 4 byte gap at the end of idx vector, week_1stday is declared as word but was set as 1 byte long field. What I wonder is in both ld-monetary and ld-numeric there was a line like: idx[cnt - 2] = iov[0].iov_len + iov[1].iov_len; in the middle of the vector in addition to such line when cnt == 2. I suppose it was a typo, so I have removed it in the patch and replaced with what is done with other fields. 2000-04-18 Jakub Jelinek * locale/programs/ld-ctype.c (ctype_output): Set size of the idx field to nelems * sizeof (uint32_t). Initialize offset to 2 and replace all 2 + elem + offset expressions with elem + offset. * locale/programs/ld-address.c (address_output): Align word fields properly. * locale/programs/ld-monetary.c (monetary_output): Likewise. Don't restart idx pointers to idx end at the duo_int_curr_symbol field. * locale/programs/ld-numeric.c (numeric_output): Likewise. Don't restart idx pointers to idx end at the decimal_point_wc field. * locale/programs/ld-time.c (time_output): week_1stday should be word, not byte. Align it properly. --- libc/locale/programs/ld-ctype.c.jj Thu Apr 13 10:57:51 2000 +++ libc/locale/programs/ld-ctype.c Tue Apr 18 13:54:35 2000 @@ -796,10 +796,10 @@ ctype_output (struct localedef_t *locale iov[0].iov_len = sizeof (data); iov[1].iov_base = (void *) idx; - iov[1].iov_len = sizeof (idx); + iov[1].iov_len = nelems * sizeof (uint32_t); idx[0] = iov[0].iov_len + iov[1].iov_len; - offset = 0; + offset = 2; for (elem = 0; elem < nelems; ++elem) { @@ -808,10 +808,9 @@ ctype_output (struct localedef_t *locale { #define CTYPE_DATA(name, base, len) \ case _NL_ITEM_INDEX (name): \ - iov[2 + elem + offset].iov_base = (base); \ - iov[2 + elem + offset].iov_len = (len); \ - if (elem + 1 < nelems) \ - idx[elem + 1] = idx[elem] + iov[2 + elem + offset].iov_len; \ + iov[elem + offset].iov_base = (base); \ + iov[elem + offset].iov_len = (len); \ + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; \ break CTYPE_DATA (_NL_CTYPE_CLASS, @@ -873,14 +872,14 @@ ctype_output (struct localedef_t *locale total = 0; for (cnt = 0; cnt < ctype->nr_charclass; ++cnt, ++offset) { - iov[2 + elem + offset].iov_base + iov[elem + offset].iov_base = (void *) ctype->classnames[cnt]; - iov[2 + elem + offset].iov_len + iov[elem + offset].iov_len = strlen (ctype->classnames[cnt]) + 1; - total += iov[2 + elem + offset].iov_len; + total += iov[elem + offset].iov_len; } - iov[2 + elem + offset].iov_base = (void *) "\0\0\0"; - iov[2 + elem + offset].iov_len = 1 + (4 - ((total + 1) % 4)); + iov[elem + offset].iov_base = (void *) "\0\0\0"; + iov[elem + offset].iov_len = 1 + (4 - ((total + 1) % 4)); total += 1 + (4 - ((total + 1) % 4)); idx[elem + 1] = idx[elem] + total; @@ -891,14 +890,14 @@ ctype_output (struct localedef_t *locale total = 0; for (cnt = 0; cnt < ctype->map_collection_nr; ++cnt, ++offset) { - iov[2 + elem + offset].iov_base + iov[elem + offset].iov_base = (void *) ctype->mapnames[cnt]; - iov[2 + elem + offset].iov_len + iov[elem + offset].iov_len = strlen (ctype->mapnames[cnt]) + 1; - total += iov[2 + elem + offset].iov_len; + total += iov[elem + offset].iov_len; } - iov[2 + elem + offset].iov_base = (void *) "\0\0\0"; - iov[2 + elem + offset].iov_len = 1 + (4 - ((total + 1) % 4)); + iov[elem + offset].iov_base = (void *) "\0\0\0"; + iov[elem + offset].iov_len = 1 + (4 - ((total + 1) % 4)); total += 1 + (4 - ((total + 1) % 4)); idx[elem + 1] = idx[elem] + total; @@ -914,31 +913,31 @@ ctype_output (struct localedef_t *locale case _NL_ITEM_INDEX (_NL_CTYPE_CODESET_NAME): total = strlen (ctype->codeset_name) + 1; if (total % 4 == 0) - iov[2 + elem + offset].iov_base = (char *) ctype->codeset_name; + iov[elem + offset].iov_base = (char *) ctype->codeset_name; else { - iov[2 + elem + offset].iov_base = alloca ((total + 3) & ~3); - memset (mempcpy (iov[2 + elem + offset].iov_base, + iov[elem + offset].iov_base = alloca ((total + 3) & ~3); + memset (mempcpy (iov[elem + offset].iov_base, ctype->codeset_name, total), '\0', 4 - (total & 3)); total = (total + 3) & ~3; } - iov[2 + elem + offset].iov_len = total; - idx[elem + 1] = idx[elem] + iov[2 + elem + offset].iov_len; + iov[elem + offset].iov_len = total; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; break; case _NL_ITEM_INDEX (_NL_CTYPE_INDIGITS_MB_LEN): - iov[2 + elem + offset].iov_base = alloca (sizeof (uint32_t)); - iov[2 + elem + offset].iov_len = sizeof (uint32_t); - *(uint32_t *) iov[2 + elem + offset].iov_base = + iov[elem + offset].iov_base = alloca (sizeof (uint32_t)); + iov[elem + offset].iov_len = sizeof (uint32_t); + *(uint32_t *) iov[elem + offset].iov_base = ctype->mbdigits_act / 10; idx[elem + 1] = idx[elem] + sizeof (uint32_t); break; case _NL_ITEM_INDEX (_NL_CTYPE_INDIGITS_WC_LEN): - iov[2 + elem + offset].iov_base = alloca (sizeof (uint32_t)); - iov[2 + elem + offset].iov_len = sizeof (uint32_t); - *(uint32_t *) iov[2 + elem + offset].iov_base = + iov[elem + offset].iov_base = alloca (sizeof (uint32_t)); + iov[elem + offset].iov_len = sizeof (uint32_t); + *(uint32_t *) iov[elem + offset].iov_base = ctype->wcdigits_act / 10; idx[elem + 1] = idx[elem] + sizeof (uint32_t); break; @@ -952,10 +951,10 @@ ctype_output (struct localedef_t *locale for (cnt = elem - _NL_CTYPE_INDIGITS0_MB; cnt < ctype->mbdigits_act; cnt += 10) total += ctype->mbdigits[cnt]->nbytes + 1; - iov[2 + elem + offset].iov_base = (char *) alloca (total); - iov[2 + elem + offset].iov_len = total; + iov[elem + offset].iov_base = (char *) alloca (total); + iov[elem + offset].iov_len = total; - cp = iov[2 + elem + offset].iov_base; + cp = iov[elem + offset].iov_base; for (cnt = elem - _NL_CTYPE_INDIGITS0_MB; cnt < ctype->mbdigits_act; cnt += 10) { @@ -963,7 +962,7 @@ ctype_output (struct localedef_t *locale ctype->mbdigits[cnt]->nbytes); *cp++ = '\0'; } - idx[elem + 1] = idx[elem] + iov[2 + elem + offset].iov_len; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; break; case _NL_ITEM_INDEX (_NL_CTYPE_OUTDIGIT0_MB) ... _NL_ITEM_INDEX (_NL_CTYPE_OUTDIGIT9_MB): @@ -973,34 +972,34 @@ ctype_output (struct localedef_t *locale necessary but it makes it easier for the user. */ cnt = elem - _NL_CTYPE_OUTDIGIT0_MB; total = ctype->mboutdigits[cnt]->nbytes + 1; - iov[2 + elem + offset].iov_base = (char *) alloca (total); - iov[2 + elem + offset].iov_len = total; + iov[elem + offset].iov_base = (char *) alloca (total); + iov[elem + offset].iov_len = total; - *(char *) mempcpy (iov[2 + elem + offset].iov_base, + *(char *) mempcpy (iov[elem + offset].iov_base, ctype->mbdigits[cnt]->bytes, ctype->mbdigits[cnt]->nbytes) = '\0'; - idx[elem + 1] = idx[elem] + iov[2 + elem + offset].iov_len; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; break; case _NL_ITEM_INDEX (_NL_CTYPE_INDIGITS0_WC) ... _NL_ITEM_INDEX (_NL_CTYPE_INDIGITS9_WC): total = ctype->wcdigits_act / 10; - iov[2 + elem + offset].iov_base = + iov[elem + offset].iov_base = (uint32_t *) alloca (total * sizeof (uint32_t)); - iov[2 + elem + offset].iov_len = total * sizeof (uint32_t); + iov[elem + offset].iov_len = total * sizeof (uint32_t); for (cnt = elem - _NL_CTYPE_INDIGITS0_WC; cnt < ctype->wcdigits_act; cnt += 10) - ((uint32_t *) iov[2 + elem + offset].iov_base)[cnt / 10] + ((uint32_t *) iov[elem + offset].iov_base)[cnt / 10] = ctype->wcdigits[cnt]; - idx[elem + 1] = idx[elem] + iov[2 + elem + offset].iov_len; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; break; case _NL_ITEM_INDEX (_NL_CTYPE_OUTDIGIT0_WC) ... _NL_ITEM_INDEX (_NL_CTYPE_OUTDIGIT9_WC): cnt = elem - _NL_CTYPE_OUTDIGIT0_WC; - iov[2 + elem + offset].iov_base = &ctype->wcoutdigits[cnt]; - iov[2 + elem + offset].iov_len = sizeof (uint32_t); - idx[elem + 1] = idx[elem] + iov[2 + elem + offset].iov_len; + iov[elem + offset].iov_base = &ctype->wcoutdigits[cnt]; + iov[elem + offset].iov_len = sizeof (uint32_t); + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; break; default: @@ -1011,19 +1010,19 @@ ctype_output (struct localedef_t *locale /* Handle extra maps. */ size_t nr = (elem - _NL_ITEM_INDEX (_NL_NUM_LC_CTYPE)) + 2; - iov[2 + elem + offset].iov_base = ctype->map32[nr]; - iov[2 + elem + offset].iov_len = ((ctype->plane_size + iov[elem + offset].iov_base = ctype->map32[nr]; + iov[elem + offset].iov_len = ((ctype->plane_size * ctype->plane_cnt) * sizeof (uint32_t)); - idx[elem + 1] = idx[elem] + iov[2 + elem + offset].iov_len; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; } } - assert (2 + elem + offset == (nelems + ctype->nr_charclass + assert (elem + offset == (nelems + ctype->nr_charclass + ctype->map_collection_nr + 2)); - write_locale_data (output_path, "LC_CTYPE", 2 + elem + offset, iov); + write_locale_data (output_path, "LC_CTYPE", elem + offset, iov); } --- libc/locale/programs/ld-address.c.jj Wed Mar 22 22:36:05 2000 +++ libc/locale/programs/ld-address.c Tue Apr 18 14:23:43 2000 @@ -328,85 +328,90 @@ address_output (struct localedef_t *loca const char *output_path) { struct locale_address_t *address = locale->categories[LC_ADDRESS].address; - struct iovec iov[2 + _NL_ITEM_INDEX (_NL_NUM_LC_ADDRESS)]; + struct iovec iov[3 + _NL_ITEM_INDEX (_NL_NUM_LC_ADDRESS)]; struct locale_file data; uint32_t idx[_NL_ITEM_INDEX (_NL_NUM_LC_ADDRESS)]; - size_t cnt = 0; + size_t elem = 0, offset = 2; data.magic = LIMAGIC (LC_ADDRESS); data.n = _NL_ITEM_INDEX (_NL_NUM_LC_ADDRESS); - iov[cnt].iov_base = (void *) &data; - iov[cnt].iov_len = sizeof (data); - ++cnt; - - iov[cnt].iov_base = (void *) idx; - iov[cnt].iov_len = sizeof (idx); - ++cnt; - - idx[cnt - 2] = iov[0].iov_len + iov[1].iov_len; - iov[cnt].iov_base = (void *) address->postal_fmt; - iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) address->country_name; - iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) address->country_post; - iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) address->country_ab2; - iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) address->country_ab3; - iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) address->country_car; - iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &address->country_num; - iov[cnt].iov_len = sizeof (uint32_t); - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) address->country_isbn; - iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) address->lang_name; - iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) address->lang_ab; - iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) address->lang_term; - iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) address->lang_lib; - iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; - ++cnt; + iov[0].iov_base = (void *) &data; + iov[0].iov_len = sizeof (data); - assert (cnt == 2 + _NL_ITEM_INDEX (_NL_NUM_LC_ADDRESS)); + iov[1].iov_base = (void *) idx; + iov[1].iov_len = sizeof (idx); + + idx[0] = iov[0].iov_len + iov[1].iov_len; + + iov[elem + offset].iov_base = (void *) address->postal_fmt; + iov[elem + offset].iov_len = strlen (iov[elem + offset].iov_base) + 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) address->country_name; + iov[elem + offset].iov_len = strlen (iov[elem + offset].iov_base) + 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) address->country_post; + iov[elem + offset].iov_len = strlen (iov[elem + offset].iov_base) + 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) address->country_ab2; + iov[elem + offset].iov_len = strlen (iov[elem + offset].iov_base) + 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) address->country_ab3; + iov[elem + offset].iov_len = strlen (iov[elem + offset].iov_base) + 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) address->country_car; + iov[elem + offset].iov_len = strlen (iov[elem + offset].iov_base) + 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + /* Align following data */ + iov[elem + offset].iov_base = (void *) "\0\0"; + iov[elem + offset].iov_len = ((idx[elem] + 3) & ~3) - idx[elem]; + idx[elem] = (idx[elem] + 3) & ~3; + ++offset; + + iov[elem + offset].iov_base = (void *) &address->country_num; + iov[elem + offset].iov_len = sizeof (uint32_t); + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) address->country_isbn; + iov[elem + offset].iov_len = strlen (iov[elem + offset].iov_base) + 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) address->lang_name; + iov[elem + offset].iov_len = strlen (iov[elem + offset].iov_base) + 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) address->lang_ab; + iov[elem + offset].iov_len = strlen (iov[elem + offset].iov_base) + 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) address->lang_term; + iov[elem + offset].iov_len = strlen (iov[elem + offset].iov_base) + 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) address->lang_lib; + iov[elem + offset].iov_len = strlen (iov[elem + offset].iov_base) + 1; + ++elem; + + assert (elem == _NL_ITEM_INDEX (_NL_NUM_LC_ADDRESS)); write_locale_data (output_path, "LC_ADDRESS", - 2 + _NL_ITEM_INDEX (_NL_NUM_LC_ADDRESS), iov); + elem + offset, iov); } --- libc/locale/programs/ld-monetary.c.jj Wed Mar 22 22:36:05 2000 +++ libc/locale/programs/ld-monetary.c Tue Apr 18 14:23:31 2000 @@ -361,250 +361,255 @@ monetary_output (struct localedef_t *loc { struct locale_monetary_t *monetary = locale->categories[LC_MONETARY].monetary; - struct iovec iov[2 + _NL_ITEM_INDEX (_NL_NUM_LC_MONETARY)]; + struct iovec iov[3 + _NL_ITEM_INDEX (_NL_NUM_LC_MONETARY)]; struct locale_file data; uint32_t idx[_NL_ITEM_INDEX (_NL_NUM_LC_MONETARY)]; - size_t cnt = 0; + size_t elem = 0, offset = 2; data.magic = LIMAGIC (LC_MONETARY); data.n = _NL_ITEM_INDEX (_NL_NUM_LC_MONETARY); - iov[cnt].iov_base = (void *) &data; - iov[cnt].iov_len = sizeof (data); - ++cnt; - - iov[cnt].iov_base = (void *) idx; - iov[cnt].iov_len = sizeof (idx); - ++cnt; - - idx[cnt - 2] = iov[0].iov_len + iov[1].iov_len; - iov[cnt].iov_base = (void *) monetary->int_curr_symbol; - iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) monetary->currency_symbol; - iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) monetary->mon_decimal_point; - iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) monetary->mon_thousands_sep; - iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = monetary->mon_grouping; - iov[cnt].iov_len = monetary->mon_grouping_len; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) monetary->positive_sign; - iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) monetary->negative_sign; - iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->int_frac_digits; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->frac_digits; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->p_cs_precedes; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->p_sep_by_space; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->n_cs_precedes; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->n_sep_by_space; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->p_sign_posn; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->n_sign_posn; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->crncystr; - iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->int_p_cs_precedes; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->int_p_sep_by_space; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->int_n_cs_precedes; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->int_n_sep_by_space; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->int_p_sign_posn; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->int_n_sign_posn; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = iov[0].iov_len + iov[1].iov_len; - iov[cnt].iov_base = (void *) monetary->duo_int_curr_symbol; - iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) monetary->duo_currency_symbol; - iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->duo_int_frac_digits; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->duo_frac_digits; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->duo_p_cs_precedes; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->duo_p_sep_by_space; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->duo_n_cs_precedes; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->duo_n_sep_by_space; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->duo_int_p_cs_precedes; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->duo_int_p_sep_by_space; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->duo_int_n_cs_precedes; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->duo_int_n_sep_by_space; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->duo_p_sign_posn; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->duo_n_sign_posn; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->duo_int_p_sign_posn; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->duo_int_n_sign_posn; - iov[cnt].iov_len = 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->uno_valid_from; - iov[cnt].iov_len = 4; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->uno_valid_to; - iov[cnt].iov_len = 4; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->duo_valid_from; - iov[cnt].iov_len = 4; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->duo_valid_to; - iov[cnt].iov_len = 4; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) monetary->conversion_rate; - iov[cnt].iov_len = 8; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->mon_decimal_point_wc; - iov[cnt].iov_len = sizeof (uint32_t); - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->mon_thousands_sep_wc; - iov[cnt].iov_len = sizeof (uint32_t); - ++cnt; + iov[0].iov_base = (void *) &data; + iov[0].iov_len = sizeof (data); - assert (cnt == 2 + _NL_ITEM_INDEX (_NL_NUM_LC_MONETARY)); + iov[1].iov_base = (void *) idx; + iov[1].iov_len = sizeof (idx); + + idx[0] = iov[0].iov_len + iov[1].iov_len; + + iov[elem + offset].iov_base = (void *) monetary->int_curr_symbol; + iov[elem + offset].iov_len = strlen (iov[elem + offset].iov_base) + 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) monetary->currency_symbol; + iov[elem + offset].iov_len = strlen (iov[elem + offset].iov_base) + 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) monetary->mon_decimal_point; + iov[elem + offset].iov_len = strlen (iov[elem + offset].iov_base) + 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) monetary->mon_thousands_sep; + iov[elem + offset].iov_len = strlen (iov[elem + offset].iov_base) + 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = monetary->mon_grouping; + iov[elem + offset].iov_len = monetary->mon_grouping_len; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) monetary->positive_sign; + iov[elem + offset].iov_len = strlen (iov[elem + offset].iov_base) + 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) monetary->negative_sign; + iov[elem + offset].iov_len = strlen (iov[elem + offset].iov_base) + 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->int_frac_digits; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->frac_digits; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->p_cs_precedes; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->p_sep_by_space; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->n_cs_precedes; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->n_sep_by_space; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->p_sign_posn; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->n_sign_posn; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->crncystr; + iov[elem + offset].iov_len = strlen (iov[elem + offset].iov_base) + 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->int_p_cs_precedes; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->int_p_sep_by_space; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->int_n_cs_precedes; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->int_n_sep_by_space; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->int_p_sign_posn; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->int_n_sign_posn; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) monetary->duo_int_curr_symbol; + iov[elem + offset].iov_len = strlen (iov[elem + offset].iov_base) + 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) monetary->duo_currency_symbol; + iov[elem + offset].iov_len = strlen (iov[elem + offset].iov_base) + 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->duo_int_frac_digits; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->duo_frac_digits; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->duo_p_cs_precedes; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->duo_p_sep_by_space; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->duo_n_cs_precedes; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->duo_n_sep_by_space; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->duo_int_p_cs_precedes; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->duo_int_p_sep_by_space; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->duo_int_n_cs_precedes; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->duo_int_n_sep_by_space; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->duo_p_sign_posn; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->duo_n_sign_posn; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->duo_int_p_sign_posn; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->duo_int_n_sign_posn; + iov[elem + offset].iov_len = 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + /* Align following data */ + iov[elem + offset].iov_base = (void *) "\0\0"; + iov[elem + offset].iov_len = ((idx[elem] + 3) & ~3) - idx[elem]; + idx[elem] = (idx[elem] + 3) & ~3; + ++offset; + + iov[elem + offset].iov_base = (void *) &monetary->uno_valid_from; + iov[elem + offset].iov_len = 4; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->uno_valid_to; + iov[elem + offset].iov_len = 4; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->duo_valid_from; + iov[elem + offset].iov_len = 4; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->duo_valid_to; + iov[elem + offset].iov_len = 4; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) monetary->conversion_rate; + iov[elem + offset].iov_len = 8; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->mon_decimal_point_wc; + iov[elem + offset].iov_len = sizeof (uint32_t); + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &monetary->mon_thousands_sep_wc; + iov[elem + offset].iov_len = sizeof (uint32_t); + ++elem; + + assert (elem == _NL_ITEM_INDEX (_NL_NUM_LC_MONETARY)); write_locale_data (output_path, "LC_MONETARY", - 2 + _NL_ITEM_INDEX (_NL_NUM_LC_MONETARY), iov); + elem + offset, iov); } --- libc/locale/programs/ld-time.c.jj Wed Mar 22 22:36:06 2000 +++ libc/locale/programs/ld-time.c Tue Apr 18 15:04:30 2000 @@ -502,7 +502,7 @@ time_output (struct localedef_t *locale, struct iovec iov[2 + _NL_ITEM_INDEX (_NL_NUM_LC_TIME) + time->num_era - 1 + 2 * 99 - + 1 + time->num_era * 10 - 1]; + + 2 + time->num_era * 10 - 1]; struct locale_file data; uint32_t idx[_NL_ITEM_INDEX (_NL_NUM_LC_TIME)]; size_t cnt, last_idx, num, n; @@ -811,8 +811,14 @@ time_output (struct localedef_t *locale, ++cnt; ++last_idx; + /* We must align the following data. */ + iov[2 + cnt].iov_base = (void *) "\0\0"; + iov[2 + cnt].iov_len = ((idx[last_idx] + 3) & ~3) - idx[last_idx]; + idx[last_idx] = (idx[last_idx] + 3) & ~3; + ++cnt; + iov[2 + cnt].iov_base = (void *) &time->week_1stday; - iov[2 + cnt].iov_len = 1; + iov[2 + cnt].iov_len = sizeof (uint32_t); idx[1 + last_idx] = idx[last_idx] + iov[2 + cnt].iov_len; ++cnt; ++last_idx; @@ -849,7 +855,7 @@ time_output (struct localedef_t *locale, assert (cnt == (_NL_ITEM_INDEX (_NL_NUM_LC_TIME) + time->num_era - 1 + 2 * 99 - + 1 + time->num_era * 10 - 1)); + + 2 + time->num_era * 10 - 1)); assert (last_idx == _NL_ITEM_INDEX (_NL_NUM_LC_TIME)); write_locale_data (output_path, "LC_TIME", 2 + cnt, iov); --- libc/locale/programs/ld-numeric.c.jj Wed Mar 22 22:36:05 2000 +++ libc/locale/programs/ld-numeric.c Tue Apr 18 14:38:18 2000 @@ -133,49 +133,55 @@ numeric_output (struct localedef_t *loca const char *output_path) { struct locale_numeric_t *numeric = locale->categories[LC_NUMERIC].numeric; - struct iovec iov[2 + _NL_ITEM_INDEX (_NL_NUM_LC_NUMERIC)]; + struct iovec iov[3 + _NL_ITEM_INDEX (_NL_NUM_LC_NUMERIC)]; struct locale_file data; uint32_t idx[_NL_ITEM_INDEX (_NL_NUM_LC_NUMERIC)]; - size_t cnt = 0; + size_t elem = 0, offset = 2; data.magic = LIMAGIC (LC_NUMERIC); data.n = _NL_ITEM_INDEX (_NL_NUM_LC_NUMERIC); - iov[cnt].iov_base = (void *) &data; - iov[cnt].iov_len = sizeof (data); - ++cnt; - - iov[cnt].iov_base = (void *) idx; - iov[cnt].iov_len = sizeof (idx); - ++cnt; - - idx[cnt - 2] = iov[0].iov_len + iov[1].iov_len; - iov[cnt].iov_base = (void *) (numeric->decimal_point ?: ""); - iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) (numeric->thousands_sep ?: ""); - iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = numeric->grouping; - iov[cnt].iov_len = numeric->grouping_len; - ++cnt; - - idx[cnt - 2] = iov[0].iov_len + iov[1].iov_len; - iov[cnt].iov_base = (void *) &numeric->decimal_point_wc; - iov[cnt].iov_len = sizeof (uint32_t); - ++cnt; - - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &numeric->thousands_sep_wc; - iov[cnt].iov_len = sizeof (uint32_t); + iov[0].iov_base = (void *) &data; + iov[0].iov_len = sizeof (data); - assert (cnt + 1 == 2 + _NL_ITEM_INDEX (_NL_NUM_LC_NUMERIC)); + iov[1].iov_base = (void *) idx; + iov[1].iov_len = sizeof (idx); + + idx[0] = iov[0].iov_len + iov[1].iov_len; + + iov[elem + offset].iov_base = (void *) (numeric->decimal_point ?: ""); + iov[elem + offset].iov_len = strlen (iov[elem + offset].iov_base) + 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) (numeric->thousands_sep ?: ""); + iov[elem + offset].iov_len = strlen (iov[elem + offset].iov_base) + 1; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = numeric->grouping; + iov[elem + offset].iov_len = numeric->grouping_len; + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + /* Align following data */ + iov[elem + offset].iov_base = (void *) "\0\0"; + iov[elem + offset].iov_len = ((idx[elem] + 3) & ~3) - idx[elem]; + idx[elem] = (idx[elem] + 3) & ~3; + ++offset; + + iov[elem + offset].iov_base = (void *) &numeric->decimal_point_wc; + iov[elem + offset].iov_len = sizeof (uint32_t); + idx[elem + 1] = idx[elem] + iov[elem + offset].iov_len; + ++elem; + + iov[elem + offset].iov_base = (void *) &numeric->thousands_sep_wc; + iov[elem + offset].iov_len = sizeof (uint32_t); + ++elem; + + assert (elem == _NL_ITEM_INDEX (_NL_NUM_LC_NUMERIC)); write_locale_data (output_path, "LC_NUMERIC", - 2 + _NL_ITEM_INDEX (_NL_NUM_LC_NUMERIC), iov); + elem + offset, iov); } Jakub From jakub@redhat.com Tue Apr 18 07:47:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Tue, 18 Apr 2000 07:47:00 -0000 Subject: [PATCH] sys/wait.h fix Message-ID: <20000418165218.E607@sunsite.ms.mff.cuni.cz> Hi! If someone does #include #include in that order and __USE_XOPEN is not defined, __WAIT_STATUS and the like won't be defined but will be used in the header, so we get parse errors. Triggered when compiling gcc. 2000-04-18 Jakub Jelinek * posix/sys/wait.h: Define __WAIT_STATUS and the like either if stdlib.h was not included or __USE_XOPEN not defined. --- libc/posix/sys/wait.h.jj Tue Apr 18 08:13:24 2000 +++ libc/posix/sys/wait.h Tue Apr 18 16:36:35 2000 @@ -35,7 +35,7 @@ typedef __pid_t pid_t; #endif /* These macros could also be defined int . */ -#ifndef _STDLIB_H +#if !defined _STDLIB_H || !defined __USE_XOPEN /* This will define the `W*' macros for the flag bits to `waitpid', `wait3', and `wait4'. */ # include Jakub From aj@oss.sgi.com Tue Apr 18 09:33:00 2000 From: aj@oss.sgi.com (Andreas Jaeger) Date: Tue, 18 Apr 2000 09:33:00 -0000 Subject: LD_DEBUG=help message References: Message-ID: <20000418093248.B6797@oss.sgi.com> On Mon, Apr 17, 2000 at 11:30:37PM -0700, Ulrich Drepper wrote: > Andreas Jaeger writes: > > > I'd like to have statistics displayed. Here's a patch. > > > > Ok, to commit? > > I've changed the patch slightly. We should document (in the help > text) what is not implemented. The patch is not right. Even without HP_TIMING you get relocation counts (but no times). I prefer my version ;-). Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de currently: aj@oss.sgi.com From aj@oss.sgi.com Tue Apr 18 10:07:00 2000 From: aj@oss.sgi.com (Andreas Jaeger) Date: Tue, 18 Apr 2000 10:07:00 -0000 Subject: Your (mine) patch to rtld.c Message-ID: Hi Uli, the version of my patch you applied to rtld.c breaks compilation on MIPS completly: rtld.c: In function `print_statistics': rtld.c:1494: `relocate_time' undeclared (first use in this function) rtld.c:1494: (Each undeclared identifier is reported only once rtld.c:1494: for each function it appears in.) rtld.c:1494: `rtld_total_time' undeclared (first use in this function) ../stdio-common/_itoa.h:35: warning: inlining failed in call to `_itoa_word' rtld.c:1495: warning: called from here rtld.c:1523: `load_time' undeclared (first use in this function) You can reproduce this if you `rm sysdeps/i386/i686/hp-timing.c sysdeps/i386/i686/hp-timing.h' and rebuild elf/rtld.os. Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de currently: aj@oss.sgi.com From drepper@redhat.com Tue Apr 18 10:13:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 18 Apr 2000 10:13:00 -0000 Subject: Your (mine) patch to rtld.c References: Message-ID: Andreas Jaeger writes: > rtld.c: In function `print_statistics': > rtld.c:1494: `relocate_time' undeclared (first use in this function) > rtld.c:1494: (Each undeclared identifier is reported only once > rtld.c:1494: for each function it appears in.) > rtld.c:1494: `rtld_total_time' undeclared (first use in this function) > ../stdio-common/_itoa.h:35: warning: inlining failed in call to `_itoa_word' > rtld.c:1495: warning: called from here > rtld.c:1523: `load_time' undeclared (first use in this function) I have added the #ifndef because you get tons of warnings on systems which are not supporting the hp timers. If I missed something somewhere simply correct it. The change should be obvious. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From aj@oss.sgi.com Tue Apr 18 10:19:00 2000 From: aj@oss.sgi.com (Andreas Jaeger) Date: Tue, 18 Apr 2000 10:19:00 -0000 Subject: Your (mine) patch to rtld.c References: Message-ID: <20000418101920.F6797@oss.sgi.com> On Tue, Apr 18, 2000 at 10:11:42AM -0700, Ulrich Drepper wrote: > Andreas Jaeger writes: > > > rtld.c: In function `print_statistics': > > rtld.c:1494: `relocate_time' undeclared (first use in this function) > > rtld.c:1494: (Each undeclared identifier is reported only once > > rtld.c:1494: for each function it appears in.) > > rtld.c:1494: `rtld_total_time' undeclared (first use in this function) > > ../stdio-common/_itoa.h:35: warning: inlining failed in call to `_itoa_word' > > rtld.c:1495: warning: called from here > > rtld.c:1523: `load_time' undeclared (first use in this function) > > I have added the #ifndef because you get tons of warnings on systems > which are not supporting the hp timers. If I missed something > somewhere simply correct it. The change should be obvious. I didn't notice that you added HP_TIMING_NONAVAIL before. Ok, I'll check a patch in soon - it's really obvious. Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de currently: aj@oss.sgi.com From drepper@redhat.com Tue Apr 18 11:30:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 18 Apr 2000 11:30:00 -0000 Subject: utmpd again Message-ID: I haven't received any comment on the utmpd issue. I assume therefore that nobody feels strongly about this. I'll remove the program now from 2.2. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From aj@oss.sgi.com Tue Apr 18 17:14:00 2000 From: aj@oss.sgi.com (Andreas Jaeger) Date: Tue, 18 Apr 2000 17:14:00 -0000 Subject: abiversions not working correctly for ld.so on MIPS-Linux Message-ID: On MIPS-Linux we've got in shlib-versions: mips.*-.*-linux.* ld=ld.so.1 GLIBC_2.0 GLIBC_2.2 but abi-versions.h contains: /* start ld.so */ #define ABI_ld_so_GLIBC_2_0 1 /* support GLIBC_2.0 */ #define VERSION_ld_so_GLIBC_2_0 GLIBC_2.0 #define ABI_ld_so_GLIBC_2_1 2 /* support GLIBC_2.1 */ #define VERSION_ld_so_GLIBC_2_1 GLIBC_2.1 #define ABI_ld_so_GLIBC_2_1_1 3 /* support GLIBC_2.1.1 */ #define VERSION_ld_so_GLIBC_2_1_1 GLIBC_2.1.1 /* end ld.so */ This looks wrong to me. For comparison, the part of libm is: /* start libm */ #define ABI_libm_GLIBC_2_0 1 /* support GLIBC_2.0 */ #define VERSION_libm_GLIBC_2_0 GLIBC_2.0 #define ABI_libm_GLIBC_2_1 ABI_libm_GLIBC_2_2 #define VERSION_libm_GLIBC_2_1 GLIBC_2.2 #define ABI_libm_GLIBC_2_2 2 /* support GLIBC_2.2 */ #define VERSION_libm_GLIBC_2_2 GLIBC_2.2 /* end libm */ Does anybody know how to fix this? Thanks, Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de currently: aj@oss.sgi.com From hjl@lucon.org Tue Apr 18 17:27:00 2000 From: hjl@lucon.org (H . J . Lu) Date: Tue, 18 Apr 2000 17:27:00 -0000 Subject: Why change posix/globtest.sh? Message-ID: <20000418172736.A16936@lucon.org> I cannot see how this patch in glibc 2.1: 2000-04-13 Ulrich Drepper * posix/globtest.sh: Work around inconsistency with expanding ~/ in shell (PR libc/1690). Reported by patsmith@pobox.com. will work. Here is the change: ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ ${common_objpfx}posix/globtest -q -t "$testdir" "~"$USER | sort > $testout -eval echo ~$USER | cmp - $testout || result=1 +# Some shell incorrectly(?) convert ~/ into // if ~ expands to /. +if test ~/ = //; then + echo / | cmp - $testout || result=1 +else + echo ~/ | cmp - $testout || result=1 +fi UIlrich, I believe you applied the patch at the wrong place. Could you please fix it? Thanks. H.J. From roland@frob.com Tue Apr 18 18:52:00 2000 From: roland@frob.com (Roland McGrath) Date: Tue, 18 Apr 2000 18:52:00 -0000 Subject: moncontrol not exported: intentional? Message-ID: <200004190152.VAA14174@frob.com> In gmon/Versions there is: __monstartup; (but note there is no __moncontrol listed) as well as: # m* moncontrol; monstartup; But in gmon/gmon.c, there is no alias `moncontrol' defined for `__moncontrol' as one might expect. The result is that monstartup and __monstartup are visible in libc.so, but neither __moncontrol nor moncontrol is. Am I right that this is just a pair of errors? If the moncontrol interface is supported, then moncontrol needs to be supported; the declaration is also missing from . There might be no need to export __moncontrol, but it seems consistent to export it too. If the moncontrol interface is not supported, then it would be less confusing to remove it from gmon/Versions and make the function static in gmon/gmon.c, the only place in libc it is used. I would like to see the interface supported, since it's in the BSD interface that includes monstartup (which we do export). From drepper@redhat.com Tue Apr 18 19:35:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 18 Apr 2000 19:35:00 -0000 Subject: [PATCH] Fix localedef, so that programs don't sigbus on SPARC References: <20000418153545.D607@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > The following is needed to get say ls run on sparc32 with e.g. LC_ALL=en_US. No, Jakub. Send me the *essential* patch and leave the rest to me. There are reasons why the code is structured as it is today. Don't remove or add variable or remove the indices. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Tue Apr 18 19:38:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 18 Apr 2000 19:38:00 -0000 Subject: Why change posix/globtest.sh? References: <20000418172736.A16936@lucon.org> Message-ID: "H . J . Lu" writes: > ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ > ${common_objpfx}posix/globtest -q -t "$testdir" "~"$USER | > sort > $testout > -eval echo ~$USER | cmp - $testout || result=1 > +# Some shell incorrectly(?) convert ~/ into // if ~ expands to /. > +if test ~/ = //; then > + echo / | cmp - $testout || result=1 > +else > + echo ~/ | cmp - $testout || result=1 > +fi > > UIlrich, I believe you applied the patch at the wrong place. Could > you please fix it? Why should this be wrong? Some shells expand ~/ for $HOME == / to //. We expect / and therefore we have to have a special test. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Tue Apr 18 19:40:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 18 Apr 2000 19:40:00 -0000 Subject: moncontrol not exported: intentional? References: <200004190152.VAA14174@frob.com> Message-ID: Roland McGrath writes: > But in gmon/gmon.c, there is no alias `moncontrol' defined for > `__moncontrol' as one might expect. This is a mistake. I've corrected this now. Seems nobody is missing the function (except you). -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From roland@frob.com Tue Apr 18 20:03:00 2000 From: roland@frob.com (Roland McGrath) Date: Tue, 18 Apr 2000 20:03:00 -0000 Subject: abiversions not working correctly for ld.so on MIPS-Linux References: Message-ID: <200004190303.XAA15913@frob.com> The trouble here results from inconsistent treatment of ld.so vs lib*.so in the Versions files and associated magic. Arguably `ld {' should appear in elf/Versions instead of `ld.so {' just as `libc {' appears instead of `libc.so {'. The soversions.i -> Versions.all processing doesn't make ld.so any kind of special case, so the intermediate processing produces a line "ld : GLIBC_2.0 GLIBC_2.2" instead of "ld.so : GLIBC_2.0 GLIBC_2.2", which fails to match the "ld.so {" section. I think the best solution would be to clean up all the magic so that it expects to see "ld {" instead of "ld.so {", just like for every other *.so there is (which all happen to be lib*.so). I haven't looked into the issues there might be with this. From aj@oss.sgi.com Tue Apr 18 20:07:00 2000 From: aj@oss.sgi.com (Andreas Jaeger) Date: Tue, 18 Apr 2000 20:07:00 -0000 Subject: abiversions not working correctly for ld.so on MIPS-Linux References: <200004190303.XAA15913@frob.com> Message-ID: <20000418200723.B10427@oss.sgi.com> On Tue, Apr 18, 2000 at 11:03:08PM -0400, Roland McGrath wrote: > The trouble here results from inconsistent treatment of ld.so vs lib*.so > in the Versions files and associated magic. Arguably `ld {' should appear > in elf/Versions instead of `ld.so {' just as `libc {' appears instead > of `libc.so {'. The soversions.i -> Versions.all processing doesn't make > ld.so any kind of special case, so the intermediate processing produces > a line "ld : GLIBC_2.0 GLIBC_2.2" instead of "ld.so : GLIBC_2.0 GLIBC_2.2", > which fails to match the "ld.so {" section. > > I think the best solution would be to clean up all the magic so that it > expects to see "ld {" instead of "ld.so {", just like for every other *.so > there is (which all happen to be lib*.so). I haven't looked into the > issues there might be with this. I'm going to see what needs to be done for this now. Thanks, Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de currently: aj@oss.sgi.com From hjl@lucon.org Tue Apr 18 20:18:00 2000 From: hjl@lucon.org (H . J . Lu) Date: Tue, 18 Apr 2000 20:18:00 -0000 Subject: Why change posix/globtest.sh? References: <20000418172736.A16936@lucon.org> Message-ID: <20000418201806.A17821@lucon.org> On Tue, Apr 18, 2000 at 07:36:02PM -0700, Ulrich Drepper wrote: > "H . J . Lu" writes: > > > ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ > > ${common_objpfx}posix/globtest -q -t "$testdir" "~"$USER | > > sort > $testout > > -eval echo ~$USER | cmp - $testout || result=1 > > +# Some shell incorrectly(?) convert ~/ into // if ~ expands to /. > > +if test ~/ = //; then > > + echo / | cmp - $testout || result=1 > > +else > > + echo ~/ | cmp - $testout || result=1 > > +fi > > > > UIlrich, I believe you applied the patch at the wrong place. Could > > you please fix it? > > Why should this be wrong? Some shells expand ~/ for $HOME == / to //. > We expect / and therefore we have to have a special test. > This is the patch for glibc 2.1. Please read PR libc/1690 and glibc 2.2. I didn't figure it out until I read PR libc/1690 and glibc 2.2. H.J. -- 2000-04-18 H.J. Lu * posix/globtest.sh: Properly apply the patch by Ulrich Drepper on 2000-04-13. --- ../../import/glibc-2.1/libc/posix/globtest.sh Thu Apr 13 20:25:20 2000 +++ posix/globtest.sh Tue Apr 18 17:29:46 2000 @@ -211,18 +211,18 @@ echo ~ | cmp - $testout || result=1 ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ ${common_objpfx}posix/globtest -q -t "$testdir" "~/" | sort > $testout -echo ~/ | cmp - $testout || result=1 - -# Test tilde expansion with username -${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ -${common_objpfx}posix/globtest -q -t "$testdir" "~"$USER | -sort > $testout # Some shell incorrectly(?) convert ~/ into // if ~ expands to /. if test ~/ = //; then echo / | cmp - $testout || result=1 else echo ~/ | cmp - $testout || result=1 fi + +# Test tilde expansion with username +${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ +${common_objpfx}posix/globtest -q -t "$testdir" "~"$USER | +sort > $testout +eval echo ~$USER | cmp - $testout || result=1 # Tilde expansion shouldn't match a file ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ From aj@oss.sgi.com Tue Apr 18 20:18:00 2000 From: aj@oss.sgi.com (Andreas Jaeger) Date: Tue, 18 Apr 2000 20:18:00 -0000 Subject: Patch for ld versions Problem Message-ID: Here's a patch to use ld instead of ld.so where needed. The generated files looked fine to me. I hope I didn't miss anything. Andreas For linuxthreads/ChangeLog: 2000-04-18 Andreas Jaeger * Versions: Use ld instead of ld.so. For ChangeLog: 2000-04-18 Andreas Jaeger * linuxthreads/Versions: Use ld instead of ld.so. * elf/Makefile (ld-map): Use ld.map. * Versions.def: Use ld instead of ld.so. * elf/Versions: Likewise. * sysdeps/mach/hurd/Versions: Likewise. ============================================================ Index: elf/Makefile --- elf/Makefile 2000/03/31 17:07:47 1.146 +++ elf/Makefile 2000/04/19 03:12:25 @@ -50,7 +50,7 @@ before-compile = $(objpfx)trusted-dirs.h ifeq ($(versioning),yes) -ld-map = $(common-objpfx)ld.so.map +ld-map = $(common-objpfx)ld.map endif ifeq (yes,$(build-shared)) ============================================================ Index: elf/Versions --- elf/Versions 2000/04/03 03:39:50 1.19 +++ elf/Versions 2000/04/19 03:12:25 @@ -16,7 +16,7 @@ } } -ld.so { +ld { GLIBC_2.0 { # global variables _dl_debug_impcalls; _dl_debug_fd; ============================================================ Index: linuxthreads/Versions --- linuxthreads/Versions 2000/04/16 00:57:18 1.20 +++ linuxthreads/Versions 2000/04/19 03:12:25 @@ -22,7 +22,7 @@ } } -ld.so { +ld { GLIBC_2.0 { # Internal libc interface to libpthread __libc_internal_tsd_get; __libc_internal_tsd_set; ============================================================ Index: Versions.def --- Versions.def 2000/04/11 06:54:02 1.24 +++ Versions.def 2000/04/19 03:12:25 @@ -80,7 +80,7 @@ libdb1 { GLIBC_2.0 } -ld.so { +ld { GLIBC_2.0 GLIBC_2.1 GLIBC_2.1.1 ============================================================ Index: sysdeps/mach/hurd/Versions --- sysdeps/mach/hurd/Versions 2000/03/30 19:26:34 1.5 +++ sysdeps/mach/hurd/Versions 2000/04/19 03:15:13 @@ -9,7 +9,7 @@ } } -ld.so { +ld { GLIBC_2.0 { # variables that must be shared with libc __hurd_sigthread_stack_base; __hurd_sigthread_stack_end; -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de currently: aj@oss.sgi.com From aj@oss.sgi.com Tue Apr 18 20:36:00 2000 From: aj@oss.sgi.com (Andreas Jaeger) Date: Tue, 18 Apr 2000 20:36:00 -0000 Subject: Patch for FAQ and manual/install.texi (rm utmpd) Message-ID: With the removal of utmpd, we shouldn't mention it anymore. Here's a patch. Andreas 2000-04-18 Andreas Jaeger * manual/install.texi (Running make install): Don't mention utmpd anymore. ============================================================ Index: manual/install.texi --- manual/install.texi 2000/03/26 06:03:42 1.40 +++ manual/install.texi 2000/04/19 03:36:14 @@ -274,12 +274,10 @@ environment or preparing a binary distribution. The directory should be specified with an absolute file name. -Glibc 2.1 includes two daemons, @code{nscd} and @code{utmpd}, which you +Glibc 2.2 includes a daemon called @code{nscd}, which you may or may not want to run. @code{nscd} caches name service lookups; it can dramatically improve performance with NIS+, and may help with DNS as -well. @code{utmpd} allows programs that use the old format for the -@file{utmp} file to coexist with new programs. For more information see -the file @file{login/README.utmpd}. +well. One auxiliary program, @file{/usr/libexec/pt_chown}, is installed setuid @code{root}. This program is invoked by the @code{grantpt} function; it ============================================================ Index: FAQ.in --- FAQ.in 2000/03/10 08:41:39 1.101 +++ FAQ.in 2000/04/19 03:33:45 @@ -1083,9 +1083,6 @@ but this is what a major release is for. It's better to have a cut now than having no means to support the new techniques later. -{MK} There is however a (partial) solution for this problem. Please take a -look at the file `login/README.utmpd'. - ?? Where are the DST_* constants found in on many systems? -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de currently: aj@oss.sgi.com From jakub@redhat.com Wed Apr 19 01:24:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Wed, 19 Apr 2000 01:24:00 -0000 Subject: [PATCH] Fix localedef, so that programs don't sigbus on SPARC References: <20000418153545.D607@sunsite.ms.mff.cuni.cz> Message-ID: <20000419102916.J607@sunsite.ms.mff.cuni.cz> On Tue, Apr 18, 2000 at 07:33:36PM -0700, Ulrich Drepper wrote: > Jakub Jelinek writes: > > > The following is needed to get say ls run on sparc32 with e.g. LC_ALL=en_US. > > No, Jakub. Send me the *essential* patch and leave the rest to me. > There are reasons why the code is structured as it is today. Don't > remove or add variable or remove the indices. Ok, fine. Here is the *essential* patch. The reason why I added variables was that with alignment iov's in the middle one has to change the cnt - 2 to cnt - 3 etc., so I thought it would be better to avoid changing all the following fields when some iov is inserted in the middle. Anyway, this patch fixes one more problems (&crncystr passed instead of crncystr, causing the pointer to be written as the string) and uses sizeof(uint32_t) instead of 4 for some word fields to make it obvious it is not a 4 byte array but a word (requiring alignment). I added some fields to categories.def which are missing there, but as I want to leave that up to you, they are commented out at the moment. 2000-04-19 Jakub Jelinek * locale/programs/ld-ctype.c (ctype_output): Set size of the idx field to nelems * sizeof (uint32_t). * locale/programs/ld-address.c (address_output): Align word fields properly. * locale/programs/ld-monetary.c (monetary_output): Likewise. Don't restart idx pointers to idx end at the duo_int_curr_symbol field. Avoid giving arbitrary garbage in the crncystr field. Use sizeof(uint32_t) instead of 4 for len in uno_valid_from, uno_valid_to, duo_valid_from, duo_valid_to and conversion_rate fields. * locale/programs/ld-numeric.c (numeric_output): Likewise. Don't restart idx pointers to idx end at the decimal_point_wc field. * locale/programs/ld-time.c (time_output): week_1stday should be word, not byte. Align it properly. --- libc/locale/programs/ld-ctype.c.jj Sat Apr 8 21:41:44 2000 +++ libc/locale/programs/ld-ctype.c Wed Apr 19 09:08:20 2000 @@ -796,7 +796,7 @@ ctype_output (struct localedef_t *locale iov[0].iov_len = sizeof (data); iov[1].iov_base = (void *) idx; - iov[1].iov_len = sizeof (idx); + iov[1].iov_len = nelems * sizeof (uint32_t); idx[0] = iov[0].iov_len + iov[1].iov_len; offset = 0; --- libc/locale/programs/ld-time.c.jj Tue Mar 21 11:58:14 2000 +++ libc/locale/programs/ld-time.c Wed Apr 19 09:41:21 2000 @@ -502,7 +502,7 @@ time_output (struct localedef_t *locale, struct iovec iov[2 + _NL_ITEM_INDEX (_NL_NUM_LC_TIME) + time->num_era - 1 + 2 * 99 - + 1 + time->num_era * 10 - 1]; + + 2 + time->num_era * 10 - 1]; struct locale_file data; uint32_t idx[_NL_ITEM_INDEX (_NL_NUM_LC_TIME)]; size_t cnt, last_idx, num, n; @@ -811,8 +811,14 @@ time_output (struct localedef_t *locale, ++cnt; ++last_idx; + /* We must align the following data. */ + iov[2 + cnt].iov_base = (void *) "\0\0"; + iov[2 + cnt].iov_len = ((idx[last_idx] + 3) & ~3) - idx[last_idx]; + idx[last_idx] = (idx[last_idx] + 3) & ~3; + ++cnt; + iov[2 + cnt].iov_base = (void *) &time->week_1stday; - iov[2 + cnt].iov_len = 1; + iov[2 + cnt].iov_len = sizeof(uint32_t); idx[1 + last_idx] = idx[last_idx] + iov[2 + cnt].iov_len; ++cnt; ++last_idx; @@ -849,7 +855,7 @@ time_output (struct localedef_t *locale, assert (cnt == (_NL_ITEM_INDEX (_NL_NUM_LC_TIME) + time->num_era - 1 + 2 * 99 - + 1 + time->num_era * 10 - 1)); + + 2 + time->num_era * 10 - 1)); assert (last_idx == _NL_ITEM_INDEX (_NL_NUM_LC_TIME)); write_locale_data (output_path, "LC_TIME", 2 + cnt, iov); --- libc/locale/programs/ld-address.c.jj Mon Jan 17 07:58:51 2000 +++ libc/locale/programs/ld-address.c Wed Apr 19 09:11:20 2000 @@ -328,7 +328,7 @@ address_output (struct localedef_t *loca const char *output_path) { struct locale_address_t *address = locale->categories[LC_ADDRESS].address; - struct iovec iov[2 + _NL_ITEM_INDEX (_NL_NUM_LC_ADDRESS)]; + struct iovec iov[3 + _NL_ITEM_INDEX (_NL_NUM_LC_ADDRESS)]; struct locale_file data; uint32_t idx[_NL_ITEM_INDEX (_NL_NUM_LC_ADDRESS)]; size_t cnt = 0; @@ -374,39 +374,46 @@ address_output (struct localedef_t *loca ++cnt; idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; + + /* Align following data */ + iov[cnt].iov_base = (void *) "\0\0"; + iov[cnt].iov_len = ((idx[cnt - 2] + 3) & ~3) - idx[cnt - 2]; + idx[cnt - 2] = (idx[cnt - 2] + 3) & ~3; + ++cnt; + iov[cnt].iov_base = (void *) &address->country_num; iov[cnt].iov_len = sizeof (uint32_t); ++cnt; - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; + idx[cnt - 3] = idx[cnt - 4] + iov[cnt - 1].iov_len; iov[cnt].iov_base = (void *) address->country_isbn; iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; ++cnt; - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; + idx[cnt - 3] = idx[cnt - 4] + iov[cnt - 1].iov_len; iov[cnt].iov_base = (void *) address->lang_name; iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; ++cnt; - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; + idx[cnt - 3] = idx[cnt - 4] + iov[cnt - 1].iov_len; iov[cnt].iov_base = (void *) address->lang_ab; iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; ++cnt; - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; + idx[cnt - 3] = idx[cnt - 4] + iov[cnt - 1].iov_len; iov[cnt].iov_base = (void *) address->lang_term; iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; ++cnt; - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; + idx[cnt - 3] = idx[cnt - 4] + iov[cnt - 1].iov_len; iov[cnt].iov_base = (void *) address->lang_lib; iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; ++cnt; - assert (cnt == 2 + _NL_ITEM_INDEX (_NL_NUM_LC_ADDRESS)); + assert (cnt == 3 + _NL_ITEM_INDEX (_NL_NUM_LC_ADDRESS)); write_locale_data (output_path, "LC_ADDRESS", - 2 + _NL_ITEM_INDEX (_NL_NUM_LC_ADDRESS), iov); + 3 + _NL_ITEM_INDEX (_NL_NUM_LC_ADDRESS), iov); } --- libc/locale/programs/ld-monetary.c.jj Thu Feb 17 16:09:55 2000 +++ libc/locale/programs/ld-monetary.c Wed Apr 19 09:31:27 2000 @@ -361,7 +361,7 @@ monetary_output (struct localedef_t *loc { struct locale_monetary_t *monetary = locale->categories[LC_MONETARY].monetary; - struct iovec iov[2 + _NL_ITEM_INDEX (_NL_NUM_LC_MONETARY)]; + struct iovec iov[3 + _NL_ITEM_INDEX (_NL_NUM_LC_MONETARY)]; struct locale_file data; uint32_t idx[_NL_ITEM_INDEX (_NL_NUM_LC_MONETARY)]; size_t cnt = 0; @@ -452,7 +452,7 @@ monetary_output (struct localedef_t *loc ++cnt; idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; - iov[cnt].iov_base = (void *) &monetary->crncystr; + iov[cnt].iov_base = (void *) monetary->crncystr; iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; ++cnt; @@ -486,7 +486,7 @@ monetary_output (struct localedef_t *loc iov[cnt].iov_len = 1; ++cnt; - idx[cnt - 2] = iov[0].iov_len + iov[1].iov_len; + idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; iov[cnt].iov_base = (void *) monetary->duo_int_curr_symbol; iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1; ++cnt; @@ -567,44 +567,51 @@ monetary_output (struct localedef_t *loc ++cnt; idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; + + /* Align following data */ + iov[cnt].iov_base = (void *) "\0\0"; + iov[cnt].iov_len = ((idx[cnt - 2] + 3) & ~3) - idx[cnt - 2]; + idx[cnt - 2] = (idx[cnt - 2] + 3) & ~3; + ++cnt; + iov[cnt].iov_base = (void *) &monetary->uno_valid_from; - iov[cnt].iov_len = 4; + iov[cnt].iov_len = sizeof(uint32_t); ++cnt; - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; + idx[cnt - 3] = idx[cnt - 4] + iov[cnt - 1].iov_len; iov[cnt].iov_base = (void *) &monetary->uno_valid_to; - iov[cnt].iov_len = 4; + iov[cnt].iov_len = sizeof(uint32_t); ++cnt; - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; + idx[cnt - 3] = idx[cnt - 4] + iov[cnt - 1].iov_len; iov[cnt].iov_base = (void *) &monetary->duo_valid_from; - iov[cnt].iov_len = 4; + iov[cnt].iov_len = sizeof(uint32_t); ++cnt; - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; + idx[cnt - 3] = idx[cnt - 4] + iov[cnt - 1].iov_len; iov[cnt].iov_base = (void *) &monetary->duo_valid_to; - iov[cnt].iov_len = 4; + iov[cnt].iov_len = sizeof(uint32_t); ++cnt; - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; + idx[cnt - 3] = idx[cnt - 4] + iov[cnt - 1].iov_len; iov[cnt].iov_base = (void *) monetary->conversion_rate; - iov[cnt].iov_len = 8; + iov[cnt].iov_len = 2 * sizeof(uint32_t); ++cnt; - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; + idx[cnt - 3] = idx[cnt - 4] + iov[cnt - 1].iov_len; iov[cnt].iov_base = (void *) &monetary->mon_decimal_point_wc; iov[cnt].iov_len = sizeof (uint32_t); ++cnt; - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; + idx[cnt - 3] = idx[cnt - 4] + iov[cnt - 1].iov_len; iov[cnt].iov_base = (void *) &monetary->mon_thousands_sep_wc; iov[cnt].iov_len = sizeof (uint32_t); ++cnt; - assert (cnt == 2 + _NL_ITEM_INDEX (_NL_NUM_LC_MONETARY)); + assert (cnt == 3 + _NL_ITEM_INDEX (_NL_NUM_LC_MONETARY)); write_locale_data (output_path, "LC_MONETARY", - 2 + _NL_ITEM_INDEX (_NL_NUM_LC_MONETARY), iov); + 3 + _NL_ITEM_INDEX (_NL_NUM_LC_MONETARY), iov); } --- libc/locale/programs/ld-numeric.c.jj Mon Jan 31 09:39:45 2000 +++ libc/locale/programs/ld-numeric.c Wed Apr 19 09:37:10 2000 @@ -133,7 +133,7 @@ numeric_output (struct localedef_t *loca const char *output_path) { struct locale_numeric_t *numeric = locale->categories[LC_NUMERIC].numeric; - struct iovec iov[2 + _NL_ITEM_INDEX (_NL_NUM_LC_NUMERIC)]; + struct iovec iov[3 + _NL_ITEM_INDEX (_NL_NUM_LC_NUMERIC)]; struct locale_file data; uint32_t idx[_NL_ITEM_INDEX (_NL_NUM_LC_NUMERIC)]; size_t cnt = 0; @@ -163,19 +163,26 @@ numeric_output (struct localedef_t *loca iov[cnt].iov_len = numeric->grouping_len; ++cnt; - idx[cnt - 2] = iov[0].iov_len + iov[1].iov_len; + idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; + + /* Align following data */ + iov[cnt].iov_base = (void *) "\0\0"; + iov[cnt].iov_len = ((idx[cnt - 2] + 3) & ~3) - idx[cnt - 2]; + idx[cnt - 2] = (idx[cnt - 2] + 3) & ~3; + ++cnt; + iov[cnt].iov_base = (void *) &numeric->decimal_point_wc; iov[cnt].iov_len = sizeof (uint32_t); ++cnt; - idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len; + idx[cnt - 3] = idx[cnt - 4] + iov[cnt - 1].iov_len; iov[cnt].iov_base = (void *) &numeric->thousands_sep_wc; iov[cnt].iov_len = sizeof (uint32_t); - assert (cnt + 1 == 2 + _NL_ITEM_INDEX (_NL_NUM_LC_NUMERIC)); + assert (cnt + 1 == 3 + _NL_ITEM_INDEX (_NL_NUM_LC_NUMERIC)); write_locale_data (output_path, "LC_NUMERIC", - 2 + _NL_ITEM_INDEX (_NL_NUM_LC_NUMERIC), iov); + 3 + _NL_ITEM_INDEX (_NL_NUM_LC_NUMERIC), iov); } --- libc/locale/categories.def.jj Mon Jan 3 07:34:53 2000 +++ libc/locale/categories.def Wed Apr 19 09:40:37 2000 @@ -102,6 +102,7 @@ DEFINE_CATEGORY DEFINE_ELEMENT (N_SEP_BY_SPACE, "n_sep_by_space", std, byte, 0, 2) DEFINE_ELEMENT (P_SIGN_POSN, "p_sign_posn", std, byte, 0, 4) DEFINE_ELEMENT (N_SIGN_POSN, "n_sign_posn", std, byte, 0, 4) +/*DEFINE_ELEMENT (CRNCYSTR, "currency_string", std, string)*/ DEFINE_ELEMENT (_NL_MONETARY_INT_P_CS_PRECEDES, "int_p_cs_precedes", std, byte, 0, 1) DEFINE_ELEMENT (_NL_MONETARY_INT_P_SEP_BY_SPACE, "int_p_sep_by_space", std, byte, 0, 2) DEFINE_ELEMENT (_NL_MONETARY_INT_N_CS_PRECEDES, "int_n_cs_precedes", std, byte, 0, 1) @@ -128,7 +129,9 @@ DEFINE_CATEGORY DEFINE_ELEMENT (_NL_MONETARY_UNO_VALID_TO, "uno_valid_to", std, word) DEFINE_ELEMENT (_NL_MONETARY_DUO_VALID_FROM, "duo_valid_from", std, word) DEFINE_ELEMENT (_NL_MONETARY_DUO_VALID_TO, "duo_valid_to", std, word) - DEFINE_ELEMENT (_NL_MONETARY_CONVERSION_RATE, "conversion_rate", std, wordarray, 2, 2) + DEFINE_ELEMENT (_NL_MONETARY_CONVERSION_RATE, "conversion_rate", std, wordarray, 2, 2) +/*DEFINE_ELEMENT (_NL_MONETARY_DECIMAL_POINT_WC, "mon_decimal_point_wc", std, word)*/ +/*DEFINE_ELEMENT (_NL_MONETARY_THOUSANDS_SEP_WC, "mon_thousands_sep_wc", std, word)*/ ), NO_POSTLOAD) @@ -136,9 +139,11 @@ DEFINE_CATEGORY ( LC_NUMERIC, "LC_NUMERIC", ( - DEFINE_ELEMENT (DECIMAL_POINT, "decimal_point", std, string) - DEFINE_ELEMENT (THOUSANDS_SEP, "thousands_sep", std, string) - DEFINE_ELEMENT (GROUPING, "grouping", std, bytearray) + DEFINE_ELEMENT (DECIMAL_POINT, "decimal_point", std, string) + DEFINE_ELEMENT (THOUSANDS_SEP, "thousands_sep", std, string) + DEFINE_ELEMENT (GROUPING, "grouping", std, bytearray) +/*DEFINE_ELEMENT (_NL_NUMERIC_DECIMAL_POINT_WC, "decimal_point_wc", std, word)*/ +/*DEFINE_ELEMENT (_NL_NUMERIC_THOUSANDS_SEP_WC, "thousands_sep_wc", std, word)*/ ), NO_POSTLOAD) Jakub From hjl@valinux.com Wed Apr 19 10:40:00 2000 From: hjl@valinux.com (H . J . Lu) Date: Wed, 19 Apr 2000 10:40:00 -0000 Subject: A patch for csu/gmon-start.c Message-ID: <20000419104037.A28421@valinux.com> On ia64, the address of a function is not the address of the label of the function. To get the address of a function label, we cannot declare it as a function. Does this patch look ok? -- H.J. Lu (hjl@gnu.org) --- 2000-04-19 H.J. Lu * csu/gmon-start.c (_start): Declared as "extern unsigned long". (etext): Likewise. --- /work/gnu/src/glibc-2.1/csu/gmon-start.c Tue Jul 29 08:29:33 1997 +++ csu/gmon-start.c Wed Apr 19 09:41:35 2000 @@ -22,8 +22,11 @@ #include #include -/* Beginning and end of our code segment. */ -extern void _start (void), etext (void); +/* Beginning and end of our code segment. We cannot declare them + as the external functions since we want the addresses of those + labels. Taking the address of a function may have different + meanings on different platforms. */ +extern const unsigned long _start, etext; #ifndef HAVE_INITFINI /* This function gets called at startup by the normal constructor From kettenis@wins.uva.nl Wed Apr 19 11:05:00 2000 From: kettenis@wins.uva.nl (Mark Kettenis) Date: Wed, 19 Apr 2000 11:05:00 -0000 Subject: A patch for csu/gmon-start.c References: <20000419104037.A28421@valinux.com> Message-ID: <200004191805.UAA11981@landau.wins.uva.nl> Date: Wed, 19 Apr 2000 10:40:37 -0700 From: "H . J . Lu" On ia64, the address of a function is not the address of the label of the function. Why is this the case? Looks pretty broken to me. Are you sure this *really* is the case, and can you explain why? Are you sure it's not some kind of bug in the ia64 toolchain. Both _start and etext refer to locations in the text segment. Declaring them as functions makes sure the addresses are looked up right for systems where the text segment uses different addressing as the data segment I suppose. You patch changes this! Mark From hjl@valinux.com Wed Apr 19 11:20:00 2000 From: hjl@valinux.com (H . J . Lu) Date: Wed, 19 Apr 2000 11:20:00 -0000 Subject: A patch for csu/gmon-start.c References: <20000419104037.A28421@valinux.com> <200004191805.UAA11981@landau.wins.uva.nl> Message-ID: <20000419112037.A28546@valinux.com> On Wed, Apr 19, 2000 at 08:05:10PM +0200, Mark Kettenis wrote: > Date: Wed, 19 Apr 2000 10:40:37 -0700 > From: "H . J . Lu" > > On ia64, the address of a function is not the address of the > label of the function. > > Why is this the case? Looks pretty broken to me. Are you sure this > *really* is the case, and can you explain why? Are you sure it's not > some kind of bug in the ia64 toolchain. That is no bug. That is how function pointer works on ia64. extern void foo (); &foo or foo doesn't give you the address of label "foo" on ia64. It returns the address of the function descriptor for "foo". > > Both _start and etext refer to locations in the text segment. > Declaring them as functions makes sure the addresses are looked up > right for systems where the text segment uses different addressing as > the data segment I suppose. You patch changes this! That is exactly the case for ia64. In this case, we want to the memory addresses of labels "_start" and "etext". -- H.J. Lu (hjl@gnu.org) From roland@frob.com Wed Apr 19 11:55:00 2000 From: roland@frob.com (Roland McGrath) Date: Wed, 19 Apr 2000 11:55:00 -0000 Subject: A patch for csu/gmon-start.c References: <20000419104037.A28421@valinux.com> Message-ID: <200004191855.OAA26401@frob.com> I think your change is ok. It is usual to use `extern void _end;' and the like for this, so that &_end has type void *. Another good choice is `extern void _end[];' or the like; that has the benefit of `_end' rather than `&_end' doing the right thing as it does when using a function declaration. (Note that `extern void _end;' has the benefit of giving you an error if you use `_end' instead of `&_end', while your declaration using a real type can result in confusingly bogus code that fetches from *&_end.) From hjl@valinux.com Wed Apr 19 12:03:00 2000 From: hjl@valinux.com (H . J . Lu) Date: Wed, 19 Apr 2000 12:03:00 -0000 Subject: A patch for csu/gmon-start.c References: <20000419104037.A28421@valinux.com> <200004191855.OAA26401@frob.com> Message-ID: <20000419120256.B28603@valinux.com> On Wed, Apr 19, 2000 at 02:55:47PM -0400, Roland McGrath wrote: > I think your change is ok. It is usual to use `extern void _end;' and the > like for this, so that &_end has type void *. Another good choice is > `extern void _end[];' or the like; that has the benefit of `_end' rather > than `&_end' doing the right thing as it does when using a function > declaration. (Note that `extern void _end;' has the benefit of giving you > an error if you use `_end' instead of `&_end', while your declaration using > a real type can result in confusingly bogus code that fetches from *&_end.) Thanks. I like it. Here is the new one. H.J. --- 2000-04-19 H.J. Lu * csu/gmon-start.c (_start): Declared as "extern void". (etext): Likewise. --- /work/gnu/import/glibc-2.1/libc/csu/gmon-start.c Mon Jul 28 14:35:38 1997 +++ csu/gmon-start.c Wed Apr 19 11:57:28 2000 @@ -22,8 +22,11 @@ #include #include -/* Beginning and end of our code segment. */ -extern void _start (void), etext (void); +/* Beginning and end of our code segment. We cannot declare them + as the external functions since we want the addresses of those + labels. Taking the address of a function may have different + meanings on different platforms. */ +extern void _start, etext; #ifndef HAVE_INITFINI /* This function gets called at startup by the normal constructor From hjl@valinux.com Wed Apr 19 16:33:00 2000 From: hjl@valinux.com (H . J . Lu) Date: Wed, 19 Apr 2000 16:33:00 -0000 Subject: binutils 2.9.5.0.37 is released. Message-ID: <20000419162914.A8328@valinux.com> This is the beta release of binutils 2.9.5.0.37 for Linux, which is based on binutils 2000 0418 plus various changes. It is purely for Linux, although it has been tested on Solaris/Sparc and Solaris/x86 from time to time. I am planning to make the public release soon. Please test it as much as you can. Please report any bugs related to binutils 2.9.5.0.37 to hjl@lucon.org. For arm-linux targets, there are some important differences in behaviour between these tools and binutils 2.9.1.0.x. The linker emulation name has changed from elf32arm{26} to armelf_linux{26}. Also, the "-p" flag must be passed with the linker when working with object files (or static libraries) created using older versions of the assembler. If this flag is omitted the linker will silently generate bad output when given old input files. To get the correct behaviour from gcc, amend the *link section of your specs file as follows: *link: %{h*} %{version:-v} %{b} %{Wl,*:%*} %{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} %{rdynamic:-export-dynamic} %{!dynamic-linker: -dynamic-linker /lib/ld-linux.so.2} -X %{mbig-endian:-EB} %{mapcs-26:-m armelf_linux26} %{!mapcs-26:-m armelf_linux} -p Changes from binutils 2.9.5.0.35: 1. Update from binutils 2000 0418. 2. Fix an ld demangle style option bug. Changes from binutils 2.9.5.0.34: 1. Update from binutils 2000 0412. Fix a relocation bug which affects the Linux kernel compilation. 2. An ELF/PPC linker script update. Changes from binutils 2.9.5.0.33: 1. Update from binutils 2000 0404. Fix the bug report bug. Changes from binutils 2.9.5.0.32: 1. Update from binutils 2000 0403. Fix the 16bit ia32 assembler bug. Changes from binutils 2.9.5.0.31: 1. Update from binutils 2000 0331. Fix the Linux/ARM assembler bug. 2. Fix a Debian assembler security bug. Changes from binutils 2.9.5.0.29: 1. Update from binutils 2000 0319. 2. An ELF/alpha bug is fixed. Changes from binutils 2.9.5.0.27: 1. Update from binutils 2000 0301. 2. A demangler bug is fixed. 3. A better fix for undefined symbols with -Bsymbolic when building shared library. Changes from binutils 2.9.5.0.24: 1. Update from binutils 2000 0204. 2. Added -taso to linker on alpha. 3. Fixed a -shared -Bsymbolic bug when PIC is not used. Changes from binutils 2.9.5.0.22: 1. Update from binutils 2000 0113. 2. A symbol version bug is fixed. 3. A -Bsymbolic bug is fixed. Changes from binutils 2.9.5.0.21: 1. Update from binutils 1999 1202. 2. Remove a MIPS/ELF change. 3. Enable SOM for HPPA. Changes from binutils 2.9.5.0.19: 1. Update from binutils 1999 1122. An ia32 gas bug is fixed. Changes from binutils 2.9.5.0.16: 1. Update from binutils 1999 1104. 2. i370 is changed to use EM_S370 and ELFOSABI_LINUX. Update readelf. 3. Fix Compaq's demangler support. Changes from binutils 2.9.5.0.14: 1. Update from binutils 1999 1012. A gas bug which affects Linux 2.3.21 is fixed. 2. i370 update. 3. The new demangler code. You should use "--style=xxx" to select the demnangle style instead of "--lang=xxx". Changes from binutils 2.9.5.0.13: 1. Update from binutils 1999 0925. 2. Fix a -s and linker script bug. Changes from binutils 2.9.5.0.12: 1. Update from binutils 1999 0922. 2. i370 update. Changes from binutils 2.9.5.0.11: 1. Update from binutils 1999 0910. It fixed a PIC linker bug on ix86 and sparc introduced in the last release. 2. i370 update. Changes from binutils 2.9.5.0.10: 1. Update from binutils 1999 0906. It fixed a PIC linker bug on ix86 and sparc. 2. Remove elf/hppa since it is WIP. Changes from binutils 2.9.5.0.8: 1. Update from binutils 1999 0831. It allows spaces around '(' and ')' in x86 FP register names. Changes from binutils 2.9.5.0.7: 1. Update from binutils 1999 0821. 2. Some MIPS changes. Changes from binutils 2.9.5.0.6: 1. Update from binutils 1999 0813. 2. i370 update. Changes from binutils 2.9.5.0.5: 1. Update from binutils 1999 0809. An ELF/Sparc ld bug is fixed. Changes from binutils 2.9.5.0.4: 1. Update from binutils 1999 0806. A Solaris/Sparc gas bug is fixed. 2. Remove mips gas patches from binutils 2.9.1.0.25. Changes from binutils 2.9.5.0.3: 1. Update from binutils 1999 0801. 2. Support for real mode x86 gcc. Changes from binutils 2.9.4.0.8: 1. Update from binutils 1999 0719. A libc 5 related bug fix. 2. Fix a typo in mips gas. Changes from binutils 2.9.4.0.7: 1. Update from binutils 1999 0710. A weak symbol bug http://egcs.cygnus.com/ml/egcs-bugs/1999-07/msg00129.html is fixed. Changes from binutils 2.9.4.0.6: 1. Update from binutils 1999 0626. Changes from binutils 2.9.4.0.5: 1. Update from binutils 1999 0620. 2. Remove my fwait fix and use the one in cvs. 3. Use "--only-section=section" instead of "--extract-section=section". for objcopy. Changes from binutils 2.9.4.0.4: 1. Update from binutils 1999 0612. 2. Remove various temporary fixes of mine since those bugs are fixed now. Changes from binutils 2.9.4.0.3: 1. Update from binutils 1999 0611. 2. Remove my ELF/Alpha bfd changes. 3. Use the local symbol copy fix in binutils 1999 0611. Changes from binutils 2.9.4.0.2: 1. Update from binutils 1999 0607. 2. Remove my Sparc hacks. 3. Fix local symbol copy. Changes from binutils 2.9.4.0.1: 1. Update from binutils 1999 0606. 2. Restore relocation overflow checking in binutils 2.9.1.0.25 so that Linux kernel can build. 3. Fix i370 for the new gas. Changes from binutils 1999 0605: 1. Fix a -Bsymbolic bug for Linux/alpha. 2. Add ELF/i370. 3. Fix 8/16-bit relocations for i386. 4. Add --redefine-sym=old_form=new_form to objcopy. 5. Add "-j section" for objcopy. 6. Fix i386 disassembler for fwait. 7. Fix a Sparc asm bug. 8. Add Ada demangle support. 9. Fix MIPS/ELF bugs. 10. Add some vxworks suppport. 11. Fix a.out assembler. The file list: 1. binutils-2.9.5.0.37.tar.gz. Source code. 2. binutils-2.9.5.0.35-2.9.5.0.37.diff.gz. Patch against the previous beta source code. 3. binutils-2.9.5.0.37-1.i386.rpm. IA-32 binary RPM for RedHat 6.1. There is no separate source rpm. You can do # rpm -ta binutils-2.9.5.0.37.tar.gz to create both binary and source rpms. The primary ftp sites for the beta Linux binutils are: 1. ftp://ftp.valinux.com/pub/support/hjl/binutils Thanks. H.J. Lu hjl@lucon.org 04/18/2000 From hjl@lucon.org Thu Apr 20 00:31:00 2000 From: hjl@lucon.org (H . J . Lu) Date: Thu, 20 Apr 2000 00:31:00 -0000 Subject: Duplicates in 2.9.5.0.37/gas/ChangeLog References: Message-ID: <20000420003125.A22415@lucon.org> On Thu, Apr 20, 2000 at 03:18:59PM +1000, Alan Modra wrote: > There seems to be a large hunk of duplicate entries. Search for > 1999-06-04 > Ooops. I updated binutils-2.9.5.0.35-2.9.5.0.37.diff.gz and binutils-2.9.5.0.37.tar.gz on ftp://ftp.valinux.com/pub/support/hjl/binutils Sorry for that. Thanks. H.J. From jakub@redhat.com Thu Apr 20 03:41:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Thu, 20 Apr 2000 03:41:00 -0000 Subject: [PATCH] libc-lock.h fix Message-ID: <20000420124611.O607@sunsite.ms.mff.cuni.cz> Hi! bits/libc-lock.h prevents gcc bootstrapping (in addition to the sys/wait.h issue I posted recently). That's because it includes libc-lock.h without __USE_UNIX98 being defined. Also, I wonder whether the weak_extern resp. #pragma weak part at the end of libc-lock.h shouldn't be surrounded by #ifdef _LIBC. 2000-04-20 Jakub Jelinek * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_* if __USE_UNIX98. --- libc/linuxthreads/sysdeps/pthread/bits/libc-lock.h.jj Tue Mar 14 08:30:37 2000 +++ libc/linuxthreads/sysdeps/pthread/bits/libc-lock.h Thu Apr 20 11:46:30 2000 @@ -209,6 +209,7 @@ extern int __pthread_mutexattr_destroy ( extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind); +#ifdef __USE_UNIX98 extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock, __const pthread_rwlockattr_t *__attr); @@ -223,6 +224,7 @@ extern int __pthread_rwlock_wrlock (pthr extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock); extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock); +#endif extern int __pthread_key_create (pthread_key_t *__key, void (*__destr_function) (void *)); Jakub From kukuk@suse.de Thu Apr 20 06:53:00 2000 From: kukuk@suse.de (Thorsten Kukuk) Date: Thu, 20 Apr 2000 06:53:00 -0000 Subject: [PATCH] New nscd option for droping privilegs Message-ID: <20000420155323.A20735@Wotan.suse.de> Hi, I have created a patch for glibc 2.2, which allows nscd to change the uid to a user without special privilegs at startup. This will only be done, if the admin configures it in nscd.conf, and no secure option (-S) is used. Thorsten -- Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de SuSE GmbH Schanzaeckerstr. 10 90443 Nuernberg Linux is like a Vorlon. It is incredibly powerful, gives terse, cryptic answers and has a lot of things going on in the background. From drepper@redhat.com Thu Apr 20 20:44:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Thu, 20 Apr 2000 20:44:00 -0000 Subject: some patches applied Message-ID: Hi, sorry for the delay in the last days. I had a lot to do due to meetings all day. I've checked in now som eof the patches I got and will continue, today, tomorrow, or during the weekend to handle the rest of my backlog. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From jakub@redhat.com Fri Apr 21 00:10:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Fri, 21 Apr 2000 00:10:00 -0000 Subject: [PATCH] vasprintf.c fix Message-ID: <20000421091541.R607@sunsite.ms.mff.cuni.cz> Hi! This patchlet kills a warning on 64bit architectures. We need a memcpy prototype... 2000-04-21 Jakub Jelinek * libio/vasprintf.c: Include string.h to get memcpy prototype. --- libc/libio/vasprintf.c.jj Thu Apr 13 09:25:31 2000 +++ libc/libio/vasprintf.c Fri Apr 21 08:59:55 2000 @@ -24,6 +24,7 @@ General Public License. */ #include +#include #include "libioP.h" #include "stdio.h" #include "strfile.h" Jakub From jakub@redhat.com Fri Apr 21 03:44:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Fri, 21 Apr 2000 03:44:00 -0000 Subject: [PATCH] Misc Alpha stuff for glibc Message-ID: <20000421125008.U607@sunsite.ms.mff.cuni.cz> Hi! When trying to compile current glibc on Alpha, I came accross these: With this patch in, the compilation still chokes during compilation of conj.c on: In file included from ../include/bits/cmathcalls.h:1, from ../math/complex.h:80, from ../include/complex.h:1, from conj.c:21: ../math/bits/cmathcalls.h: In function `cimagf': ../math/bits/cmathcalls.h:139: Unable to access imaginary part of complex value in a hard register on this target (gcc 2.95.3). gcc does not like the cimagf complex float inline (but if I ifdef that inline out for alpha, it chokes later on on conjf.c). What's the proper solution for this, Richard? 2000-04-21 Jakub Jelinek * sysdeps/unix/sysv/linux/alpha/msgctl.c (__syscall_msgctl): Declare. * sysdeps/unix/sysv/linux/alpha/semctl.c (__syscall_semctl): Declare. * sysdeps/unix/sysv/linux/alpha/shmctl.c (__syscall_shmctl): Declare. * sysdeps/unix/sysv/linux/alpha/getrusage.S: Surround uses of $f28 with .set noat/at to shut up warnings. * sysdeps/unix/sysv/linux/alpha/syscalls.list (__fstatfs64): Add alias. * sysdeps/unix/sysv/linux/alpha/ioperm.c (init_iosys): Allow compilation if __NR_pciconfig_iobase is not defined. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (__fstatfs64): Add alias. --- libc/sysdeps/unix/sysv/linux/alpha/msgctl.c.jj Tue Apr 4 11:56:37 2000 +++ libc/sysdeps/unix/sysv/linux/alpha/msgctl.c Fri Apr 21 09:54:47 2000 @@ -44,6 +44,8 @@ struct __old_msqid_ds __ipc_pid_t msg_lrpid; /* pid of last msgrcv() */ }; +extern int __syscall_msgctl (int, int, void *); + /* Allows to control internal state and destruction of message queue objects. */ int __new_msgctl (int, int, struct msqid_ds *); --- libc/sysdeps/unix/sysv/linux/alpha/shmctl.c.jj Tue Apr 4 11:56:38 2000 +++ libc/sysdeps/unix/sysv/linux/alpha/shmctl.c Fri Apr 21 09:54:02 2000 @@ -52,6 +52,8 @@ struct __old_shminfo int shmall; }; +extern int __syscall_shmctl (int, int, void *); + /* Provide operations to control over shared memory segments. */ int __new_shmctl (int, int, struct shmid_ds *); --- libc/sysdeps/unix/sysv/linux/alpha/semctl.c.jj Tue Apr 4 11:56:38 2000 +++ libc/sysdeps/unix/sysv/linux/alpha/semctl.c Fri Apr 21 10:17:35 2000 @@ -49,6 +49,7 @@ union semun struct seminfo *__buf; /* buffer for IPC_INFO */ }; +extern int __syscall_semctl (int, int, int, void *); /* Return identifier for array of NSEMS semaphores associated with KEY. */ --- libc/sysdeps/unix/sysv/linux/alpha/getrusage.S.jj Sun Aug 23 06:08:46 1998 +++ libc/sysdeps/unix/sysv/linux/alpha/getrusage.S Fri Apr 21 10:27:00 2000 @@ -99,7 +99,9 @@ $do32: ldi v0, SYS_ify(osf_getrusage) ldt $f25, 96(a1) # ru_msgrcv ldt $f26, 104(a1) # ru_nsignals ldt $f27, 112(a1) # ru_nvcsw + .set noat ldt $f28, 120(a1) # ru_nivcsw + .set at stq t0, 0(a1) stq t1, 8(a1) stq t2, 16(a1) @@ -117,7 +119,9 @@ $do32: ldi v0, SYS_ify(osf_getrusage) stt $f25, 112(a1) stt $f26, 120(a1) stt $f27, 128(a1) + .set noat stt $f28, 136(a1) + .set at addq sp, 16, sp ret --- libc/sysdeps/unix/sysv/linux/alpha/syscalls.list.jj Tue Mar 21 11:58:31 2000 +++ libc/sysdeps/unix/sysv/linux/alpha/syscalls.list Fri Apr 21 11:09:02 2000 @@ -22,7 +22,7 @@ mmap - mmap 6 __mmap mmap __mmap64 mm llseek EXTRA lseek 3 __libc_lseek64 __llseek llseek __lseek64 lseek64 pread - pread 4 __libc_pread __libc_pread64 __pread pread __pread64 pread64 pwrite - pwrite 4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64 -fstatfs - fstatfs 2 __fstatfs fstatfs fstatfs64 +fstatfs - fstatfs 2 __fstatfs fstatfs __fstatfs64 fstatfs64 statfs - statfs 2 __statfs statfs statfs64 getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64 setrlimit - setrlimit 2 setrlimit setrlimit64 --- libc/sysdeps/unix/sysv/linux/alpha/ioperm.c.jj Tue Mar 21 11:58:31 2000 +++ libc/sysdeps/unix/sysv/linux/alpha/ioperm.c Fri Apr 21 11:53:30 2000 @@ -537,6 +537,7 @@ init_iosys (void) /* First try the pciconfig_iobase syscall added to 2.2.15 and 2.3.99. */ +#ifdef __NR_pciconfig_iobase addr = __pciconfig_iobase (IOBASE_DENSE_MEM, 0, 0); if (addr != -1) { @@ -578,6 +579,7 @@ init_iosys (void) return 0; } +#endif /* Second, collect the contents of /etc/alpha_systype or /proc/cpuinfo. */ --- libc/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list.jj Mon Jan 31 09:40:03 2000 +++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list Fri Apr 21 11:08:11 2000 @@ -4,7 +4,7 @@ llseek EXTRA lseek 3 __llseek llseek __libc_lseek64 __lseek64 lseek64 pread - pread 4 __libc_pread __libc_pread64 __pread pread __pread64 pread64 pwrite - pwrite 4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64 -fstatfs - fstatfs 2 __fstatfs fstatfs fstatfs64 +fstatfs - fstatfs 2 __fstatfs fstatfs __fstatfs64 fstatfs64 statfs - statfs 2 __statfs statfs statfs64 getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64 setrlimit - setrlimit 2 setrlimit setrlimit64 Jakub From drepper@redhat.com Fri Apr 21 08:03:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Fri, 21 Apr 2000 08:03:00 -0000 Subject: [PATCH] vasprintf.c fix References: <20000421091541.R607@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > This patchlet kills a warning on 64bit architectures. We need a memcpy > prototype... I've applied the patch. Thanks, -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Fri Apr 21 10:21:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Fri, 21 Apr 2000 10:21:00 -0000 Subject: __builtin_expect Message-ID: You might have seen that I've added in the last week several more __builtin_expect "calls" to the sources. Most of you will probably see that this does not change anything since __builtin_expect is defined for you as a macro which is appsing down the first argument. But that need not be so. If you use the current mainline gcc you'll get the nifty code rth implemented last weekend which adds __builtin_expect to the official gcc. It was before an ugly hack in Cygnus's internal compiler which could not possibly be ported over. __builtin_expect has the prototype long int __builtin_expect (long int exp, long int val) and it means that almost certainly the value of `exp' is `val'. This probability value will then be used in condition expressions. The use of __builtin_expect has now two uses: - on platforms where conditional jump instructions have prediction bits this information can be used to set them - on all architectures it should now be possible to use -freorder-blocks to use the information to put the basic blocks in an order which guarantees an optimal straight pass through the code for the normal case. In glibc this means __builtin_expect should be used everywhere the results of comparisons etc is statically predictable. At the very least it should be used for error handling. E.g.; ptr = malloc (size); if (ptr == NULL) { ... some work ... return -1; } should be written as ptr = malloc (size); if (__builtin_expect (ptr == NULL, 0)) { ... some work ... return -1; } This will (normally) ensure that the basic block for the `then' block is put out of line and does not disturb the normal execution (and keeps the icache free of garbage). What you can see as well in the example is how to handle expression which are not of `int' or `long int' value. Simply put the whole comparison in the first argument and you get an expression of type `int'. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Fri Apr 21 10:39:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Fri, 21 Apr 2000 10:39:00 -0000 Subject: use of malloc Message-ID: While I added __builtin_expect in a few more places I was especially looking at memory allocation code since, as explained in the last mail, the error checking for the memory allocation functions is a perfect candidate for the use of __builtin_expect. Then I stumbled accross the NIS code which contains a lot of bugs. I don't want to pick on this too much but I'm pretty sure I haven't made these mistakes in the code I wrote. What I want to achieve is that everybody goes again over the code he wrote and looks for the folling bugs and optimization possibilities. I've made a fre minutes ago some changes to one file in the NIS code which might serve as a guideline. Please follow the guidelines below: - *always* check the result of the memory allocation functions. These are not only malloc, calloc, realloc, etc but also strdup, asprintf, and all the others doing implicit allocations. - make sure you free all the memory allocated in the error case. This might get ugly but, as in the NIS file I corrected, you can use goto for this. This is a legitemate use of goto. - in general, make sure no memory is leaked. I'm pretty sure I got most of the code I'm using on my system (i.e., no NIS) leak free using the tools we have already in glibc. Please use them in your environments as well. I'll improve the tool a bit sometime soon so it'll be easier to use but it's already usable. - optimize the user of malloc/calloc. Often a struct and its content have to be allocated at the same time. The easiest way if to do it on two steps with two allocations. But if the information has the same lifetime this is a waste. The malloc and especially the free function is pretty slow. A better way is to allocate enough space in the block to have room for the struct and the data. Example (without error checking): struct test_struct *sp = malloc (sizeof (struct test_struct)); sp->data = malloc (nent * sizeof (int)); This can be written better as struct test_struct *sp = malloc (sizeof (struct test_struct) + nent * sizeof (int)); sp->data = (int *) (sp + 1); The advantages should be obvious: + one malloc call + therefore, one free call + therefore, simpler error case handling The above can be done for as many different pieces as you want. Throughout glibc you'll find numerous examples of code where I use this. The only thing you have to be careful about is alignment. - use __builtin_expect for the error case. This is the perfect use for __builtin_expect since we never want to optimize for this case. It's always the exception. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Fri Apr 21 11:16:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Fri, 21 Apr 2000 11:16:00 -0000 Subject: use of malloc References: Message-ID: Greg McGary writes: > I'd prefer a more compact way of doing this. Perhaps a new builtin > like this might work: > > sp->data = __builtin_bounded_ptr_split (sp, sp + 1); This looks fine to me. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From aj@oss.sgi.com Fri Apr 21 11:38:00 2000 From: aj@oss.sgi.com (Andreas Jaeger) Date: Fri, 21 Apr 2000 11:38:00 -0000 Subject: use of malloc Message-ID: <20000421113808.H9310@oss.sgi.com> Hi Uli, can you document these guidlines somewhere? I'd prefer to have a file "Developing glibc" which contains all information a glibc developer needs. Thanks, Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de currently: aj@oss.sgi.com From drepper@redhat.com Fri Apr 21 11:59:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Fri, 21 Apr 2000 11:59:00 -0000 Subject: use of malloc References: <20000421113808.H9310@oss.sgi.com> Message-ID: Andreas Jaeger writes: > can you document these guidlines somewhere? I'd prefer to have a file > "Developing glibc" which contains all information a glibc developer needs. I'm collecting the mails I sent out and will put them in a file somewhere. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Fri Apr 21 23:56:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Fri, 21 Apr 2000 23:56:00 -0000 Subject: [PATCH] Misc Alpha stuff for glibc References: <20000421125008.U607@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > When trying to compile current glibc on Alpha, I came accross these: Since rth hasn't screamed "no!" I've applied the patch now. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From rth@twiddle.net Sat Apr 22 16:02:00 2000 From: rth@twiddle.net (Richard Henderson) Date: Sat, 22 Apr 2000 16:02:00 -0000 Subject: __builtin_expect References: Message-ID: <20000422160248.A21295@twiddle.net> On Fri, Apr 21, 2000 at 10:19:02AM -0700, Ulrich Drepper wrote: > In glibc this means __builtin_expect should be used everywhere the > results of comparisons etc is statically predictable. At the very > least it should be used for error handling. E.g.; > > ptr = malloc (size); > if (ptr == NULL) Note that gcc's built in estimate_probabilities function is supposed to get this right -- eq with NULL predicted false. It doesn't hurt to mark it anyway though... r~ From roland@frob.com Sun Apr 23 16:02:00 2000 From: roland@frob.com (Roland McGrath) Date: Sun, 23 Apr 2000 16:02:00 -0000 Subject: www.gnu.org libc web pages Message-ID: <200004232302.TAA24145@frob.com> The www.gnu.org libc web pages are out of date and not being maintained. The GNU project would like to have someone take responsibility for them. Able volunteers should contact and . (If you don't already know for sure that you're an "able volunteer", then you probably aren't--but your assistance might still be helpful to the person who is able to be in charge of the pages.) From kukuk@suse.de Mon Apr 24 23:11:00 2000 From: kukuk@suse.de (Thorsten Kukuk) Date: Mon, 24 Apr 2000 23:11:00 -0000 Subject: use of malloc References: Message-ID: <20000425081122.A17677@Wotan.suse.de> On Fri, Apr 21, Ulrich Drepper wrote: > - make sure you free all the memory allocated in the error case. This > might get ugly but, as in the NIS file I corrected, you can use goto > for this. This is a legitemate use of goto. Uli, please look at the ChangeLog file. You have removed similar free's in other parts of the NIS code. > - optimize the user of malloc/calloc. Often a struct and its content > have to be allocated at the same time. The easiest way if to do it > on two steps with two allocations. But if the information has the > same lifetime this is a waste. The malloc and especially the free > function is pretty slow. This is not true for NIS. All NIS functions needs the most time waiting for the network. You will not see your optiomization in any benchmark, but it makes the code look more ugly. And your new Code is wrong. You derefence NULL Pointer !!!!! Please remove it complete and don't change code, which you don't understand in such a way. What do you think is xdr_free () good for ? Thorsten -- Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de SuSE GmbH Schanzaeckerstr. 10 90443 Nuernberg Linux is like a Vorlon. It is incredibly powerful, gives terse, cryptic answers and has a lot of things going on in the background. From drepper@redhat.com Mon Apr 24 23:24:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 24 Apr 2000 23:24:00 -0000 Subject: use of malloc References: <20000425081122.A17677@Wotan.suse.de> Message-ID: Thorsten Kukuk writes: > Uli, please look at the ChangeLog file. You have removed similar free's > in other parts of the NIS code. In some of them. But not the once where we terminated a function in the case we found an error != ENOMEM. This happened in the function I changed together with the missing frees in the __nis_destroy_callback. This must have leaked quite a lot. > And your new Code is wrong. You derefence NULL Pointer !!!!! Where? > Please remove it complete and don't change code, which you don't > understand in such a way. Well, I understand enough to see that the functions are leaking a lot of memory during normal operation. > What do you think is xdr_free () good for ? Something which is allocated using calloc() can be freed using free. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From jakub@redhat.com Tue Apr 25 00:16:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Tue, 25 Apr 2000 00:16:00 -0000 Subject: [PATCH] Another Alpha glibc patch Message-ID: <20000425091856.L540@sunsite.ms.mff.cuni.cz> Hi! With this in and a backport of the short complex patch in gcc 2.95.x I was able to build alpha glibc finally :). 2000-04-25 Jakub Jelinek * sysdeps/alpha/dl-machine.h (_dl_start_user): Fix the _dl_skip_args handling. --- libc/sysdeps/alpha/dl-machine.h.jj Tue Apr 18 08:13:24 2000 +++ libc/sysdeps/alpha/dl-machine.h Tue Apr 25 08:57:44 2000 @@ -291,7 +291,7 @@ _dl_start_user: /* See if we were run as a command with the executable file name as an extra leading argument. */ ldl $1, _dl_skip_args - beq $1, $fixup_stack + bne $1, $fixup_stack $fixup_stack_ret: /* The special initializer gets called with the stack just as the application's entry point will see it; it can @@ -316,7 +316,7 @@ $fixup_stack: ldq $2, 0($sp) subq $2, $1, $2 mov $sp, $4 - s8addq $2, $sp, $3 + s8addq $1, $sp, $3 stq $2, 0($sp) /* Copy down argv. */ 0: ldq $5, 8($3) Jakub From kukuk@suse.de Tue Apr 25 00:26:00 2000 From: kukuk@suse.de (Thorsten Kukuk) Date: Tue, 25 Apr 2000 00:26:00 -0000 Subject: use of malloc References: <20000425081122.A17677@Wotan.suse.de> Message-ID: <20000425092615.A26175@Wotan.suse.de> On Mon, Apr 24, Ulrich Drepper wrote: > Thorsten Kukuk writes: > > > Uli, please look at the ChangeLog file. You have removed similar free's > > in other parts of the NIS code. > > In some of them. But not the once where we terminated a function in > the case we found an error != ENOMEM. This happened in the function I > changed together with the missing frees in the __nis_destroy_callback. > This must have leaked quite a lot. There was no leak. It was ok that strdup returns NULL, nothing bad happens, but the other data could be enought for funcionality. Your current patches for nis_callback doesn't show any new free, so no memory leak fix from you there. > > > And your new Code is wrong. You derefence NULL Pointer !!!!! > > Where? For example here: --- nis_callback.c 1999/08/13 19:44:46 1.11 +++ nis_callback.c 2000/04/21 16:49:33 1.12 @@ -370,6 +402,11 @@ svc_destroy (cb->xprt); close (cb->sock); xdr_free ((xdrproc_t) _xdr_nis_server, (char *) cb->serv); + free (cb->serv->ep.ep_val[0].uaddr); + free (cb->serv->ep.ep_val[0].proto); + free (cb->serv->ep.ep_val[0].family); + free (cb->serv->ep.ep_val); + free (cb->serv->name); free (cb->serv); But as I can see from cvs, you have removed the code after my email this morning (or you have checked in your new changes after my email this morning). > > Please remove it complete and don't change code, which you don't > > understand in such a way. > > Well, I understand enough to see that the functions are leaking a lot > of memory during normal operation. Why does mtrace doesn't find them ? Thorsten -- Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de SuSE GmbH Schanzaeckerstr. 10 90443 Nuernberg Linux is like a Vorlon. It is incredibly powerful, gives terse, cryptic answers and has a lot of things going on in the background. From kukuk@suse.de Tue Apr 25 05:40:00 2000 From: kukuk@suse.de (Thorsten Kukuk) Date: Tue, 25 Apr 2000 05:40:00 -0000 Subject: [PATCH] nscd PR/1702 Message-ID: <20000425143947.A32632@Wotan.suse.de> Hi, here is a patch for nscd which fixes PR/1702. It is for glibc 2.1 and glibc 2.2. Thorsten -- Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de SuSE GmbH Schanzaeckerstr. 10 90443 Nuernberg Linux is like a Vorlon. It is incredibly powerful, gives terse, cryptic answers and has a lot of things going on in the background. From aj@suse.de Tue Apr 25 09:19:00 2000 From: aj@suse.de (Andreas Jaeger) Date: Tue, 25 Apr 2000 09:19:00 -0000 Subject: Adding hwcap support to ldconfig/ld.so.cache Message-ID: Hi libc-hacker, The support for hwcaps in the dynamic linker is not working completly since the cache file doesn't handle it. Here's an example: You can put a library compiled with mmx support on ix86 in /lib/mmx and it should be used instead of the one in /lib if your system support mmx. This works only if the library is *not* in the cache (check the output of LD_DEBUG=libs LD_PRELOAD=nonexisting ls). I'd like to add hwcaps support to the cache. Unfortunatly I couldn't find a clean way to extend the current cache file (if you see one, please tell me). For compatibility with libc5, I don't want to change the format. Therefore I'm proposing to add a new file "ld.so.ncache". ldconfig will create both files but glibc 2.2 will only read the new file. I'm considering two extend the old format as follows: This is an entry for a single library: struct file_entry { int flags; /* This is 1 for an ELF library. */ unsigned int filename, path; /* String table indices. */ unsigned long hwcap; /* Hwcap entry. */ }; The hwcap entry is new. I'm also considering to change the semantics for the strings: We currently use a filename and the complete path including the filename, e.g. we save "libc.so.6" and "/lib/libc.so.6, (stored as indices into a string table). To save space (the file is mapped into each binary and read at every program start), I'd prefer to only store the filename and the path without it, e.g. "libc.so.6" and "/lib". Since we only have a small number of paths, this should reduce the size significantly. The only disadvandge would be that the dynamic linker needs to construct the complete pathname from these two components. I'll try to test both methods and compare file size. Should we add some unused entries to the struct? Is anybody in need of some more entries? The cache file itself should be easy to extend (if not, please speak up). I therefore added some unused entries and also one field to record the size of the string table. Since the string table comes directly after the file_entry array, it should now be possible to add further tables after the string table. Here's the structure: #define CACHEMAGIC_NEW "glibc-ld.so.ncache" #define VERSION "1.0" struct cache_file { char magic[sizeof CACHEMAGIC_NEW - 1]; char version[sizeof VERSION - 1]; unsigned int nlibs; /* Number of entries. */ unsigned int len_strings; /* Size of string table. */ unsigned int unused[4]; /* Leave space for future extensions. */ struct file_entry libs[0]; /* Entries describing libraries. */ /* After this the string table of size len_strings is found. */ }; I've also added a version number which can be easily incremented. Since we now have ldconfig as part of glibc, we could now even make incompatible changes. Roland, Hurd's dynamic linker is currently not using the cache. Do you want to leave it this way, or would you like to use this feature now? Could you please send me your comments on this? I'd like to go ahead and implement this soonish (in fact I've already started adding this to ldconfig). Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de From jakub@redhat.com Tue Apr 25 10:22:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Tue, 25 Apr 2000 10:22:00 -0000 Subject: [PATCH] sparc64 crt{begin,end}{,S} Message-ID: <20000425192530.R540@sunsite.ms.mff.cuni.cz> Hi! There is no reason why glibc should provide these when gcc provides them, and they don't work correctly (e.g. using the glibc crt* the libpthread constructor is never called). 2000-04-25 Jakub Jelinek * sysdeps/sparc/sparc64/elf/Dist: Remove. * sysdeps/sparc/sparc64/elf/crtbegin.S: Remove. * sysdeps/sparc/sparc64/elf/crtbeginS.S: Remove. * sysdeps/sparc/sparc64/elf/crtend.S: Remove. * sysdeps/sparc/sparc64/elf/crtendS.S: Remove. * sysdeps/sparc/sparc64/elf/Makefile: Don't build crtbegin/crtend objects. --- libc/sysdeps/sparc/sparc64/elf/Dist.jj Thu Aug 14 03:45:59 1997 +++ libc/sysdeps/sparc/sparc64/elf/Dist Tue Apr 25 19:06:19 2000 @@ -1,4 +0,0 @@ -crtbegin.S -crtbeginS.S -crtend.S -crtendS.S --- libc/sysdeps/sparc/sparc64/elf/crtbeginS.S.jj Thu Aug 14 03:45:59 1997 +++ libc/sysdeps/sparc/sparc64/elf/crtbeginS.S Tue Apr 25 19:06:19 2000 @@ -1 +0,0 @@ -#include "crtbegin.S" --- libc/sysdeps/sparc/sparc64/elf/crtend.S.jj Wed Sep 16 19:46:13 1998 +++ libc/sysdeps/sparc/sparc64/elf/crtend.S Tue Apr 25 19:06:19 2000 @@ -1,69 +0,0 @@ -/* Constructor startup code for elf64-sparc - Copyright (C) 1997 Free Software Foundation, Inc. - Contributed by Richard Henderson , 1997. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - -.section ".ctors",#alloc,#write - - .align 8 -__CTOR_END__: - .xword 0 - -.section ".dtors",#alloc,#write - - .align 8 -__DTOR_END__: - .xword 0 - -.section ".init",#alloc,#execinstr - - call __do_global_ctors_aux - nop - -.text - - .align 4 - .type __do_global_ctors_aux,#function -__do_global_ctors_aux: - save %sp,-192,%sp - -#ifdef PIC -1: call 11f - sethi %hi(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7 -11: or %l7, %lo(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7 - add %l7, %o7, %l7 - sethi %hi(__CTOR_END__), %l0 - or %l0, %lo(__CTOR_END__), %l0 - ldx [%l7+%l0], %l0 -#else - sethi %hi(__CTOR_END__), %l0 - or %l0, %lo(__CTOR_END__), %l0 -#endif - - ba 3f - ldx [%l0+8], %l1 -2: jmpl %l1, %o7 - ldx [%l0+8], %l1 -3: addcc %l1, 1, %g0 - bnz,pt %xcc, 2b - add %l0, 8, %l0 - - ret - restore - - .size __do_global_ctors_aux,.-__do_global_ctors_aux --- libc/sysdeps/sparc/sparc64/elf/crtendS.S.jj Thu Aug 14 03:45:59 1997 +++ libc/sysdeps/sparc/sparc64/elf/crtendS.S Tue Apr 25 19:06:19 2000 @@ -1 +0,0 @@ -#include "crtend.S" --- libc/sysdeps/sparc/sparc64/elf/Makefile.jj Wed Aug 20 05:29:21 1997 +++ libc/sysdeps/sparc/sparc64/elf/Makefile Wed Aug 20 05:29:20 1997 @@ -1,10 +1,4 @@ +# Sparc/ELF specific definitions. + # The assembler on SPARC needs the -fPIC flag even when it's assembler code. ASFLAGS-.os = -fPIC - -ifeq ($(subdir), csu) -extra-objs += crtbegin.o crtend.o crtbeginS.o crtendS.o -install-lib += crtbegin.o crtend.o crtbeginS.o crtendS.o - -CPPFLAGS-crtbeginS.S = -fPIC -DPIC -CPPFLAGS-crtendS.S = -fPIC -DPIC -endif --- libc/sysdeps/sparc/sparc64/elf/crtbegin.S.jj Wed Sep 16 19:46:12 1998 +++ libc/sysdeps/sparc/sparc64/elf/crtbegin.S Tue Apr 25 19:06:19 2000 @@ -1,68 +0,0 @@ -/* Destructor cleanup code for elf64-sparc - Copyright (C) 1997 Free Software Foundation, Inc. - Contributed by Richard Henderson , 1997. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - - -.section ".ctors",#alloc,#write - - .align 8 -__CTOR_LIST__: - .xword -1 - -.section ".dtors",#alloc,#write - - .align 8 -__DTOR_LIST__: - .xword -1 - -.section ".fini",#alloc,#execinstr - - call __do_global_dtors_aux - nop - -.text - - .align 4 - .type __do_global_dtors_aux,#function -__do_global_dtors_aux: - save %sp,-192,%sp - -#ifdef PIC -1: call 11f - sethi %hi(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7 -11: or %l7, %lo(_GLOBAL_OFFSET_TABLE_-(1b-.)), %l7 - add %l7, %o7, %l7 - sethi %hi(__DTOR_LIST__), %l0 - or %l0, %lo(__DTOR_LIST__), %l0 - ldx [%l7+%l0], %l0 -#else - sethi %hi(__DTOR_LIST__), %l0 - or %l0, %lo(__DTOR_LIST__), %l0 -#endif - - ba 3f - ldx [%l0+8], %l1 -2: jmpl %l1, %o7 - ldx [%l0+8], %l1 -3: brnz,pt %l1, 2b - add %l0, 8, %l0 - - ret - restore - - .size __do_global_dtors_aux,.-__do_global_dtors_aux Jakub From jakub@redhat.com Tue Apr 25 22:02:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Tue, 25 Apr 2000 22:02:00 -0000 Subject: .cvsignore files in glibc Message-ID: <20000426070548.S540@sunsite.ms.mff.cuni.cz> Hi! Is it intentional that .cvsignore files in the glibc tree list among other things even files/directories which are included in the CVS tree? I glibc/linuxthreads I glibc/crypt/ChangeLog.old I glibc/po/header.pot I glibc/po/libc.pot I glibc/posix/glob/ChangeLog I glibc/sysdeps/unix/bsd/osf/=dirstream.h If not, I can provide a patch. It quite complicates things because one has to remember to kill all .cvsignore files before doing cvs import from cvs export. Jakub From aj@suse.de Tue Apr 25 22:44:00 2000 From: aj@suse.de (Andreas Jaeger) Date: Tue, 25 Apr 2000 22:44:00 -0000 Subject: .cvsignore files in glibc References: <20000426070548.S540@sunsite.ms.mff.cuni.cz> Message-ID: >>>>> Jakub Jelinek writes: > Hi! > Is it intentional that .cvsignore files in the glibc tree list among other > things even files/directories which are included in the CVS tree? > I glibc/linuxthreads > I glibc/crypt/ChangeLog.old > I glibc/po/header.pot > I glibc/po/libc.pot > I glibc/posix/glob/ChangeLog > I glibc/sysdeps/unix/bsd/osf/=dirstream.h > If not, I can provide a patch. It quite complicates things because one has > to remember to kill all .cvsignore files before doing cvs import from cvs > export. I guess this is an oversight since e.g. linuxthreads was not from the beginning in cvs. Please send a patch. Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de From aj@suse.de Tue Apr 25 23:57:00 2000 From: aj@suse.de (Andreas Jaeger) Date: Tue, 25 Apr 2000 23:57:00 -0000 Subject: Some assorted patches Message-ID: Looking through glibc, I noticed some minor problems which I've fixed with the appended patch. Uli, shall I check this in? Andreas 2000-04-25 Andreas Jaeger * conform/Makefile (distribute): Also distribute contents of subdirectories. * Makerules (no_deps): Remove abi-versions.h. * nis/nis_print_group_entry.c: Include alloca.h for alloca prototype. ============================================================ Index: conform/Makefile --- conform/Makefile 1999/08/24 17:50:32 1.1 +++ conform/Makefile 2000/04/26 06:47:41 @@ -1,4 +1,4 @@ -# Copyright (C) 1999 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000 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 @@ -21,4 +21,5 @@ # subdir := conform -distribute = conformtest.pl $(wildcard data/*.h-data) +distribute = conformtest.pl $(wildcard data/*.h-data) \ + $(wildcard data/*/*.h-data) ============================================================ Index: Makerules --- Makerules 2000/04/03 03:38:11 1.334 +++ Makerules 2000/04/26 06:47:43 @@ -283,7 +283,7 @@ -include $(common-objpfx)sysd-versions $(addprefix $(common-objpfx),$(version-maps)): $(common-objpfx)sysd-versions common-generated += $(version-maps) -postclean-generated += sysd-versions Versions.all +postclean-generated += sysd-versions Versions.all abi-versions.h ifndef avoid-generated ifneq ($(sysd-versions-subdirs),$(all-subdirs) $(config-sysdirs)) ============================================================ Index: nis/nis_print_group_entry.c --- nis/nis_print_group_entry.c 2000/04/22 03:30:39 1.6 +++ nis/nis_print_group_entry.c 2000/04/26 06:47:43 @@ -17,6 +17,7 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include #include #include -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de From jakub@redhat.com Wed Apr 26 01:28:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Wed, 26 Apr 2000 01:28:00 -0000 Subject: .cvsignore files in glibc References: <20000426070548.S540@sunsite.ms.mff.cuni.cz> Message-ID: <20000426103125.T540@sunsite.ms.mff.cuni.cz> On Wed, Apr 26, 2000 at 07:39:37AM +0200, Andreas Jaeger wrote: > >>>>> Jakub Jelinek writes: > > > Hi! > > Is it intentional that .cvsignore files in the glibc tree list among other > > things even files/directories which are included in the CVS tree? > > > I glibc/linuxthreads > > I glibc/crypt/ChangeLog.old > > I glibc/po/header.pot > > I glibc/po/libc.pot > > I glibc/posix/glob/ChangeLog > > I glibc/sysdeps/unix/bsd/osf/=dirstream.h > > > If not, I can provide a patch. It quite complicates things because one has > > to remember to kill all .cvsignore files before doing cvs import from cvs > > export. > > I guess this is an oversight since e.g. linuxthreads was not from the > beginning in cvs. Please send a patch. Something like this. I wonder if =dirstream.h shouldn't be removed as well (I believe nothing uses it anyway, it does not get installed nor distributed either). The only uncovered file then is ChangeLog.old which is ignored by default by CVS. Can we rename that file, say to ChangeLog.1? 2000-04-26 Jakub Jelinek * .cvsignore: Remove linuxthreads. * po/.cvsignore: Remove *.pot. * posix/glob/.cvsignore: Removed. * sysdeps/unix/bsd/osf/.cvsignore: Removed. --- libc/.cvsignore.jj Wed Apr 26 07:45:16 2000 +++ libc/.cvsignore Wed Apr 26 07:45:45 2000 @@ -19,8 +19,6 @@ analysis docs releases -linuxthreads - libc.prj .libc.prcs_aux libc.proj .snprj --- libc/po/.cvsignore.jj Wed Apr 26 07:45:54 2000 +++ libc/po/.cvsignore Wed Apr 26 07:46:12 2000 @@ -1,2 +1,2 @@ -[a-z]*.pot *.mo +*.mo ttt --- libc/posix/glob/.cvsignore.jj Fri Feb 17 21:33:33 1995 +++ libc/posix/glob/.cvsignore Wed Apr 26 09:27:29 2000 @@ -1 +0,0 @@ -ChangeLog --- libc/sysdeps/unix/bsd/osf/.cvsignore.jj Wed Mar 19 13:48:14 1997 +++ libc/sysdeps/unix/bsd/osf/.cvsignore Wed Apr 26 10:11:44 2000 @@ -1 +0,0 @@ -=* Jakub From jakub@redhat.com Wed Apr 26 01:35:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Wed, 26 Apr 2000 01:35:00 -0000 Subject: [PATCH] Fix full-config-sysdirs Message-ID: <20000426103823.U540@sunsite.ms.mff.cuni.cz> Hi! full-config-sysdirs is exported and bash2 is complaining about hyphens in exported variable names. 2000-04-26 Jakub Jelinek * Makeconfig (full_config_sysdirs): Renamed from full-config-sysdirs. * Makerules (full_config_sysdirs): Likewise. * MakeTAGS (full_config_sysdirs): Likewise. --- libc/MakeTAGS.jj Tue Jan 4 17:11:48 2000 +++ libc/MakeTAGS Wed Apr 26 10:20:41 2000 @@ -39,7 +39,7 @@ tags_sources = $(all-sources) $(all-head endif # ctype endif # No tags_sources -sysdep-dirs := $(full-config-sysdirs) +sysdep-dirs := $(full_config_sysdirs) ifndef sysdep_dirs # Find all sysdep directories. --- libc/Makerules.jj Tue Apr 4 01:32:54 2000 +++ libc/Makerules Wed Apr 26 10:21:12 2000 @@ -58,13 +58,13 @@ include $(..)Makeconfig endif # `configure' writes a definition of `config-sysdirs' in `config.make'. -sysdirs = $(strip $(full-config-sysdirs)) +sysdirs = $(strip $(full_config_sysdirs)) +sysdir_pfx = $(common-objpfx) export sysdirs := $(sysdirs) -+sysdep_dirs := $(full-config-sysdirs) ++sysdep_dirs := $(full_config_sysdirs) ifdef objdir +sysdep_dirs := $(objdir) $(+sysdep_dirs) endif --- libc/Makeconfig.jj Tue Apr 4 01:32:54 2000 +++ libc/Makeconfig Wed Apr 26 10:22:20 2000 @@ -93,7 +93,7 @@ binfmt-subdir = aout endif # Complete path to sysdep dirs. -export full-config-sysdirs := $(addprefix $(..),$(config-sysdirs)) +export full_config_sysdirs := $(addprefix $(..),$(config-sysdirs)) # Run config.status to update config.make and config.h. We don't show the # dependence of config.h to Make, because it is only touched when it @@ -107,7 +107,7 @@ $(common-objpfx)config.make: $(common-ob # Find all the sysdeps configure fragments, to make sure we re-run # configure when any of them changes. $(common-objpfx)config.status: $(..)version.h $(..)configure \ - $(foreach dir,$(full-config-sysdirs),\ + $(foreach dir,$(full_config_sysdirs),\ $(wildcard \ $(dir)/Implies) \ $(patsubst %.in,%,\ Jakub From jakub@redhat.com Wed Apr 26 06:03:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Wed, 26 Apr 2000 06:03:00 -0000 Subject: [PATCH] nis_callback.c fix Message-ID: <20000426150636.V540@sunsite.ms.mff.cuni.cz> Hi! nis_callback.c does not compile on sparc64 (it is returning a pointer to struct, so it should not return enum values). While at it, I tried to remove leaks in the code. 2000-04-26 Jakub Jelinek * nis/nis_callback.c (__nis_create_callback): Do failed memory allocation fixups centrally, fix __builtin_expect call, return NULL on failure, not NIS_NOMEMORY. --- libc/nis/nis_callback.c.jj Wed Apr 26 06:58:22 2000 +++ libc/nis/nis_callback.c Wed Apr 26 14:39:04 2000 @@ -279,29 +279,21 @@ __nis_create_callback (int (*callback) ( unsigned short port; cb = (struct nis_cb *) calloc (1, sizeof (struct nis_cb)); - if (__builtin_expect (cb == NULL, )) - { - syslog (LOG_ERR, "NIS+: out of memory allocating callback"); - return NULL; - } - + if (__builtin_expect (cb == NULL, 0)) + goto failed; cb->serv = (nis_server *) calloc (1, sizeof (nis_server)); if (__builtin_expect (cb->serv == NULL, 0)) - { - free (cb); - syslog (LOG_ERR, "NIS+: out of memory allocating callback"); - return NULL; - } + goto failed; cb->serv->name = strdup (nis_local_principal ()); if (__builtin_expect (cb->serv->name == NULL, 0)) - return NIS_NOMEMORY; + goto failed; cb->serv->ep.ep_val = (endpoint *) calloc (2, sizeof (endpoint)); if (__builtin_expect (cb->serv->ep.ep_val == NULL, 0)) - return NIS_NOMEMORY; + goto failed; cb->serv->ep.ep_len = 1; cb->serv->ep.ep_val[0].family = strdup ("inet"); if (__builtin_expect (cb->serv->ep.ep_val[0].family == NULL, 0)) - return NIS_NOMEMORY; + goto failed; cb->callback = callback; cb->userdata = userdata; @@ -331,18 +323,11 @@ __nis_create_callback (int (*callback) ( #endif } - if (flags & USE_DGRAM) - { - cb->serv->ep.ep_val[0].proto = strdup ("udp"); - cb->xprt = svcudp_bufcreate (sock, 100, 8192); - } - else - { - cb->serv->ep.ep_val[0].proto = strdup ("tcp"); - cb->xprt = svctcp_create (sock, 100, 8192); - } + cb->serv->ep.ep_val[0].proto = strdup ((flags & USE_DGRAM) ? "udp" : "tcp"); if (__builtin_expect (cb->serv->ep.ep_val[0].proto == NULL, 0)) - return NIS_NOMEMORY; + goto failed; + cb->xprt = (flags & USE_DGRAM) ? svcudp_bufcreate (sock, 100, 8192) : + svctcp_create (sock, 100, 8192); cb->sock = cb->xprt->xp_sock; if (!svc_register (cb->xprt, CB_PROG, CB_VERS, cb_prog_1, 0)) { @@ -372,6 +357,19 @@ __nis_create_callback (int (*callback) ( cb->serv->ep.ep_val[0].uaddr = strdup (addr); return cb; + +failed: + if (cb) + { + if (cb->serv) + { + xdr_free ((xdrproc_t) _xdr_nis_server, (char *) cb->serv); + free (cb->serv); + } + free (cb); + } + syslog (LOG_ERR, "NIS+: out of memory allocating callback"); + return NULL; } nis_error Jakub From aj@suse.de Wed Apr 26 20:44:00 2000 From: aj@suse.de (Andreas Jaeger) Date: Wed, 26 Apr 2000 20:44:00 -0000 Subject: Why change posix/globtest.sh? References: <20000418172736.A16936@lucon.org> <20000418201806.A17821@lucon.org> Message-ID: >>>>> H J Lu writes: HJ> On Tue, Apr 18, 2000 at 07:36:02PM -0700, Ulrich Drepper wrote: >> "H . J . Lu" writes: >> >> > ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ >> > ${common_objpfx}posix/globtest -q -t "$testdir" "~"$USER | >> > sort > $testout >> > -eval echo ~$USER | cmp - $testout || result=1 >> > +# Some shell incorrectly(?) convert ~/ into // if ~ expands to /. >> > +if test ~/ = //; then >> > + echo / | cmp - $testout || result=1 >> > +else >> > + echo ~/ | cmp - $testout || result=1 >> > +fi >> > >> > UIlrich, I believe you applied the patch at the wrong place. Could >> > you please fix it? >> >> Why should this be wrong? Some shells expand ~/ for $HOME == / to //. >> We expect / and therefore we have to have a special test. >> HJ> This is the patch for glibc 2.1. Please read PR libc/1690 and glibc HJ> 2.2. I didn't figure it out until I read PR libc/1690 and glibc 2.2. You're right - I've fixed and commited this for 2.2 now. Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de From hjl@lucon.org Wed Apr 26 20:52:00 2000 From: hjl@lucon.org (H . J . Lu) Date: Wed, 26 Apr 2000 20:52:00 -0000 Subject: Why change posix/globtest.sh? References: <20000418172736.A16936@lucon.org> <20000418201806.A17821@lucon.org> Message-ID: <20000426205157.A25608@lucon.org> On Thu, Apr 27, 2000 at 05:43:47AM +0200, Andreas Jaeger wrote: > >>>>> H J Lu writes: > > HJ> On Tue, Apr 18, 2000 at 07:36:02PM -0700, Ulrich Drepper wrote: > >> "H . J . Lu" writes: > >> > >> > ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ > >> > ${common_objpfx}posix/globtest -q -t "$testdir" "~"$USER | > >> > sort > $testout > >> > -eval echo ~$USER | cmp - $testout || result=1 > >> > +# Some shell incorrectly(?) convert ~/ into // if ~ expands to /. > >> > +if test ~/ = //; then > >> > + echo / | cmp - $testout || result=1 > >> > +else > >> > + echo ~/ | cmp - $testout || result=1 > >> > +fi > >> > > >> > UIlrich, I believe you applied the patch at the wrong place. Could > >> > you please fix it? > >> > >> Why should this be wrong? Some shells expand ~/ for $HOME == / to //. > >> We expect / and therefore we have to have a special test. > >> > > HJ> This is the patch for glibc 2.1. Please read PR libc/1690 and glibc > HJ> 2.2. I didn't figure it out until I read PR libc/1690 and glibc 2.2. > > You're right - I've fixed and commited this for 2.2 now. My patch is for glibc 2.1. Why did you change 2.2? H.J. From aj@suse.de Wed Apr 26 21:02:00 2000 From: aj@suse.de (Andreas Jaeger) Date: Wed, 26 Apr 2000 21:02:00 -0000 Subject: Why change posix/globtest.sh? References: <20000418172736.A16936@lucon.org> <20000418201806.A17821@lucon.org> <20000426205157.A25608@lucon.org> Message-ID: >>>>> H J Lu writes: HJ> On Thu, Apr 27, 2000 at 05:43:47AM +0200, Andreas Jaeger wrote: >> >>>>> H J Lu writes: [...] HJ> This is the patch for glibc 2.1. Please read PR libc/1690 and glibc HJ> 2.2. I didn't figure it out until I read PR libc/1690 and glibc 2.2. >> >> You're right - I've fixed and commited this for 2.2 now. HJ> My patch is for glibc 2.1. Why did you change 2.2? Upps - shame on me :-(. I clean up the mess now. Thanks for checking this, Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de From jakub@redhat.com Thu Apr 27 00:48:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Thu, 27 Apr 2000 00:48:00 -0000 Subject: [PATCH] (was Re: .cvsignore files in glibc) References: <20000426070548.S540@sunsite.ms.mff.cuni.cz> <20000426103125.T540@sunsite.ms.mff.cuni.cz> <200004262058.NAA12070@localhost.cygnus.com> Message-ID: <20000427095137.E540@sunsite.ms.mff.cuni.cz> On Wed, Apr 26, 2000 at 01:58:32PM -0700, Geoff Keating wrote: > > Date: Wed, 26 Apr 2000 10:31:25 +0200 > > From: Jakub Jelinek > > > The only uncovered file then is ChangeLog.old which is ignored by default by > > CVS. Can we rename that file, say to ChangeLog.1? > > I named it ChangeLog.old so emacs wouldn't find it. Probably the > right thing to do is to merge all its entries into the toplevel > ChangeLog and delete the whole file. Ok with this? --- libc/crypt/ChangeLog.old.jj Tue Feb 29 06:21:42 2000 +++ libc/crypt/ChangeLog.old Thu Apr 27 09:35:23 2000 @@ -1,24 +0,0 @@ -1998-12-25 Geoff Keating - - * sysdeps/unix/ufc-crypt.h: Use . - - * configure: Delete the code dealing with building the add-on - outside glibc, as this doesn't work. - -1998-12-10 Geoff Keating - - * sysdeps/unix/crypt-entry.c: Don't include "patchlevel.h". - - * sysdeps/unix/crypt.h: Move __crypt_r, __setkey_r, __encrypt_r to... - * sysdeps/unix/crypt-private.h: ...here. - - * sysdeps/unix/crypt.h: Add __restrict to the structure parameters. - * sysdeps/unix/crypt-private.h: Likewise. Also add const to - first parameter of _ufc_mk_keytab_r. - * sysdeps/unix/crypt.c: Update prototypes. - * sysdeps/unix/crypt-entry.c: Likewise. - * sysdeps/unix/crypt_util.c: Likewise. - - * sysdeps/unix/crypt-entry.c (crypt): Use __crypt_r not crypt_r. - -ChangeLog starts here, with version 2.0.96. --- libc/ChangeLog.9.jj Sun Feb 7 01:05:42 1999 +++ libc/ChangeLog.9 Thu Apr 27 09:35:12 2000 @@ -1261,6 +1261,13 @@ * sysdeps/generic/statvfs64.c: Likewise. * sysdeps/unix/sysv/linux/statvfs64.c: Likewise. +1998-12-25 Geoff Keating + + * crypt/sysdeps/unix/ufc-crypt.h: Use . + + * crypt/configure: Delete the code dealing with building the add-on + outside glibc, as this doesn't work. + 1998-12-25 Ulrich Drepper * elf/dl-hash.h: Move to... @@ -1680,6 +1687,24 @@ * po/es.po: Update from translation team. * po/fr.po: Likewise. + +1998-12-10 Geoff Keating + + * crypt/sysdeps/unix/crypt-entry.c: Don't include "patchlevel.h". + + * crypt/sysdeps/unix/crypt.h: Move __crypt_r, __setkey_r, + __encrypt_r to... + * crypt/sysdeps/unix/crypt-private.h: ...here. + + * crypt/sysdeps/unix/crypt.h: Add __restrict to the structure + parameters. + * crypt/sysdeps/unix/crypt-private.h: Likewise. Also add const to + first parameter of _ufc_mk_keytab_r. + * crypt/sysdeps/unix/crypt.c: Update prototypes. + * crypt/sysdeps/unix/crypt-entry.c: Likewise. + * crypt/sysdeps/unix/crypt_util.c: Likewise. + + * crypt/sysdeps/unix/crypt-entry.c (crypt): Use __crypt_r not crypt_r. 1998-12-10 Thorsten Kukuk Jakub From jakub@redhat.com Thu Apr 27 01:40:00 2000 From: jakub@redhat.com (Jakub Jelinek) Date: Thu, 27 Apr 2000 01:40:00 -0000 Subject: [PATCH] getxxbyyy_r@GLIBC_2.0 fix Message-ID: <20000427104353.F540@sunsite.ms.mff.cuni.cz> Hi! Without this the compiled glibc has several undefined symvers. 1998-12-27 Jakub Jelinek * nss/getXXbyYY_r.c: Fix a typo in __old_getxxbyyy_r versioning. --- libc/nss/getXXbyYY_r.c.jj Tue Apr 4 01:33:00 2000 +++ libc/nss/getXXbyYY_r.c Thu Apr 27 10:23:15 2000 @@ -236,7 +236,7 @@ OLD (REENTRANT_NAME) (ADD_PARAMS, LOOKUP #define do_symbol_version(real, name, version) \ compat_symbol (libc, real, name, version) -do_symbol_version (OLD (REENTRANT_GETNAME), REENTRANT_NAME, GLIBC_2_0); +do_symbol_version (OLD (REENTRANT_NAME), REENTRANT_NAME, GLIBC_2_0); #define do_default_symbol_version(real, name, version) \ versioned_symbol (libc, real, name, version) Jakub From aj@suse.de Thu Apr 27 02:51:00 2000 From: aj@suse.de (Andreas Jaeger) Date: Thu, 27 Apr 2000 02:51:00 -0000 Subject: [PATCH] getxxbyyy_r@GLIBC_2.0 fix References: <20000427104353.F540@sunsite.ms.mff.cuni.cz> Message-ID: >>>>> Jakub Jelinek writes: > Hi! > Without this the compiled glibc has several undefined symvers. > 1998-12-27 Jakub Jelinek Whow - you fixed a bug before it appeared! I'm really impressed. > * nss/getXXbyYY_r.c: Fix a typo in __old_getxxbyyy_r versioning. This looks fine, I've commited it now. Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de From drepper@redhat.com Thu Apr 27 13:19:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Thu, 27 Apr 2000 13:19:00 -0000 Subject: LDT use in LinuxThreads Message-ID: I've enabled the use of the LDT-based thread descriptor for Liunx on i686 by default now. It works for me now and I've worked around the problem in libgcc (they are using thread functions far too early) by some special hack. If it does not work for you please let me know about the kernel version you are using. In this case you can safely compile glibc for everything below i686 since it won't use the new code. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From hjl@lucon.org Thu Apr 27 17:49:00 2000 From: hjl@lucon.org (H . J . Lu) Date: Thu, 27 Apr 2000 17:49:00 -0000 Subject: GCC 3.0 Release Criteria References: <200004271445.KAA13474@caip.rutgers.edu> <20000427095256.C11838@cygnus.com> <20000427173305.J570@perlsupport.com> <20000427174246.C12403@cygnus.com> Message-ID: <20000427174915.A29108@lucon.org> On Thu, Apr 27, 2000 at 05:42:46PM -0700, Richard Henderson wrote: > On Thu, Apr 27, 2000 at 05:33:05PM -0700, Chip Salzenberg wrote: > > Multiple versions of libgcc.so will be required on any given system, > > because eventually we'll have to make an incompatible change. > I am late on this topic. Sorry if it has been resolved. If we make libgcc.so, where do we put it? I hope it won't be in /prefix/lib/gcc-lib/cpu-vendor-os/version. Otherwise, upgrading gcc may break binaries. If we can encode the libgcc ABI into it's soname, /prefix/lib/gcc-lib/cpu-vendor-os or /prefix/lib/gcc-lib may be candidates. H.J. From hjl@lucon.org Thu Apr 27 18:15:00 2000 From: hjl@lucon.org (H . J . Lu) Date: Thu, 27 Apr 2000 18:15:00 -0000 Subject: GCC 3.0 Release Criteria References: <200004271445.KAA13474@caip.rutgers.edu> <20000427095256.C11838@cygnus.com> <20000427173305.J570@perlsupport.com> <20000427174246.C12403@cygnus.com> <20000427174915.A29108@lucon.org> <20000427180023.D12403@cygnus.com> Message-ID: <20000427181514.A29236@lucon.org> On Thu, Apr 27, 2000 at 06:00:23PM -0700, Richard Henderson wrote: > On Thu, Apr 27, 2000 at 05:49:15PM -0700, H . J . Lu wrote: > > I am late on this topic. Sorry if it has been resolved. > > We have not yet discussed where to put the thing yet. > We've only been covering the "is it even a good idea" part. > The only thing I can think of is binaries linked against libgcc.so won't run on systems without it :-). In general, I like the idea to put one symbol in one place. If we ever decide to use libgcc.so on Linux, we should make it mandatory. Otherwise, it will be hard to have the binary compatibility across Linux machines. H.J. From hjl@lucon.org Thu Apr 27 19:58:00 2000 From: hjl@lucon.org (H . J . Lu) Date: Thu, 27 Apr 2000 19:58:00 -0000 Subject: GCC 3.0 Release Criteria References: <200004271445.KAA13474@caip.rutgers.edu> <20000427095256.C11838@cygnus.com> <20000427173305.J570@perlsupport.com> <20000427174246.C12403@cygnus.com> <20000427184257.M570@perlsupport.com> Message-ID: <20000427195828.A29636@lucon.org> If there is a libgcc.so, I prefer it is called something else and installed under /lib on Linux. We may have other compilers and /usr may not be mounted during boot. I can live with libcompilers.so. H.J. From drepper@redhat.com Thu Apr 27 20:26:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Thu, 27 Apr 2000 20:26:00 -0000 Subject: [PATCH] Another Alpha glibc patch References: <20000425091856.L540@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > With this in and a backport of the short complex patch in gcc 2.95.x > I was able to build alpha glibc finally :). Thanks, I've applied the patch. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Thu Apr 27 22:25:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Thu, 27 Apr 2000 22:25:00 -0000 Subject: [PATCH] (was Re: .cvsignore files in glibc) References: <20000426070548.S540@sunsite.ms.mff.cuni.cz> <20000426103125.T540@sunsite.ms.mff.cuni.cz> <200004262058.NAA12070@localhost.cygnus.com> <20000427095137.E540@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > > I named it ChangeLog.old so emacs wouldn't find it. Probably the > > right thing to do is to merge all its entries into the toplevel > > ChangeLog and delete the whole file. > > Ok with this? I've applied the patch. Thanks, -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Thu Apr 27 22:36:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Thu, 27 Apr 2000 22:36:00 -0000 Subject: lots of patches checked in Message-ID: I've checked in most of the patches I got in the last days. If one is missing please let me know. Thanks, -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From aj@suse.de Sat Apr 29 10:16:00 2000 From: aj@suse.de (Andreas Jaeger) Date: Sat, 29 Apr 2000 10:16:00 -0000 Subject: conform data for arpa/inet.h Message-ID: Hi Uli, I'm appending the conform test data for . Since this is the first time I've created such a file, I'd ask you to review it very carefully (it's completly untested). is part of the current Austin-Draft. What kind of test macro should be used to mark this? Andreas 2000-04-29 Andreas Jaeger * conform/data/arpa/inet.h-data: New file. * conform/conformtest.pl: Add arpa/inet.h as header. ============================================================ Index: conform/conformtest.pl --- conform/conformtest.pl 2000/02/27 23:22:23 1.10 +++ conform/conformtest.pl 2000/04/29 17:04:00 @@ -17,7 +17,7 @@ "math.h", "locale.h", "libgen.h", "langinfo.h", "iso646.h", "inttypes.h", "iconv.h", "grp.h", "glob.h", "ftw.h", "fnmatch.h", "fmtmsg.h", "float.h", "fcntl.h", "errno.h", "dlfcn.h", "dirent.h", - "ctype.h", "cpio.h", "assert.h", "aio.h"); + "ctype.h", "cpio.h", "assert.h", "arpa/inet.h", "aio.h"); # These are the ISO C99 keywords. @keywords = ('auto', 'break', 'case', 'char', 'const', 'continue', 'default', ============================================================ Index: conform/data/arpa/inet.h-data --- conform/data/arpa/inet.h-data created +++ conform/data/arpa/inet.h-data Sat Apr 29 19:02:07 2000 1.1 @@ -0,0 +1,31 @@ +#ifndef ISO +// in_port_t should have exactly 16 bits +type in_port_t +// in_addr_t should have exactly 32 bits +type in_addr_t + +type uint32_t +type uint16_t + +macro INET_ADDRSTRLEN +macro INET6_ADDRSTRLEN + +// The following can be declared as functions, defined as macros or both: +function uint32_t htonl (uint32_t); +function uint16_t htons (uint16_t); +function uint32_t ntohl (uint32_t); +function uint16_t htons (uint16_t); + +function in_addr_t inet_addr (const char*); +function in_addr_t inet_lnaof (struct in_addr); +function {struct in_addr} inet_makeaddr (in_addr_t, in_addr_t); +function in_addrt_t inet_netof (struct in_addr); +function in_addrt_t inet_network (const char *); +function {char*} inet_ntoa (struct in_addr); +function {const char*} inet_ntop (int, const void*, char*, socklen_t); +function int inet_pton (int, const char*, void*); + +allow-header netinet/in.h +allow-header inttypes.h + +#endif -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de From drepper@redhat.com Sat Apr 29 21:19:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Sat, 29 Apr 2000 21:19:00 -0000 Subject: conform data for arpa/inet.h References: Message-ID: Andreas Jaeger writes: > I'm appending the conform test data for . Darn. I started making all the changes since I thought you wouldn't do it. > is part of the current Austin-Draft. What kind of test > macro should be used to mark this? Normally I use __USE_UNIX2K for these things (until something is final). But in the case where a header is newly introduced no feature test macro is needed. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From aj@suse.de Sun Apr 30 06:57:00 2000 From: aj@suse.de (Andreas Jaeger) Date: Sun, 30 Apr 2000 06:57:00 -0000 Subject: conform data for arpa/inet.h References: Message-ID: >>>>> Ulrich Drepper writes: > Andreas Jaeger writes: >> I'm appending the conform test data for . > Darn. I started making all the changes since I thought you wouldn't do it. Sorry, I've been a bit busy the last week and I waited for an answer from you before. But I'm now checking your changes and send some more patches. I'm also going to work on limits.h-data the coming week. >> is part of the current Austin-Draft. What kind of test >> macro should be used to mark this? > Normally I use __USE_UNIX2K for these things (until something is > final). But in the case where a header is newly introduced no feature > test macro is needed. You misunderstood me - what's used for conformdata? You missed to remove YESEXPR and NOEXPR from langinfo.h-data. They should be surrounded by the equivalent for conformdata of __USE_UNIX2K: #ifndef __USE_UNIX2K # define YESEXPR # define NOEXPR #endif Btw. shouldn't we remove ndbm.h-data since we removed the db support? Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.rhein-neckar.de From drepper@redhat.com Sun Apr 30 09:50:00 2000 From: drepper@redhat.com (Ulrich Drepper) Date: Sun, 30 Apr 2000 09:50:00 -0000 Subject: conform data for arpa/inet.h References: Message-ID: Andreas Jaeger writes: > You misunderstood me - what's used for conformdata? Nothing. We should not test for old standards. > You missed to remove YESEXPR and NOEXPR from langinfo.h-data. Not really. I'll keep these. Nobody can remove these symbold since they might be used. They are simply not required for new implementations anymore. Removing the symbols would mean one more report about a namespace violation. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------