This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi! On Mon, Jul 21, 2003 at 03:10:10PM -0700, Ulrich Drepper wrote: > This patch doesn't work in x86. You end up with duplicated definitions. What about this then? 2003-07-22 Jakub Jelinek <jakub@redhat.com> * elf/Makefile (CFLAGS-ldconfig.c): Define IS_IN_ldconfig. * elf/ldconfig.c: Include dl-procinfo.c. (PROCINFO_CLASS): Define. * sysdeps/generic/ldsodefs.h (PROCINFO_CLASS): Define. * sysdeps/unix/sysv/linux/x86_64/dl-procinfo.c: New file. * sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h: New file. * sysdeps/unix/sysv/linux/i386/dl-procinfo.c (PROCINFO_CLASS): Define if not yet defined. Use it instead of EXTERN. Undefine at the end of the file. * sysdeps/unix/sysv/linux/arm/dl-procinfo.c (PROCINFO_CLASS): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.c (PROCINFO_CLASS): Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.c (PROCINFO_CLASS): Likewise. --- libc/elf/Makefile.jj 2003-06-02 18:43:44.000000000 -0400 +++ libc/elf/Makefile 2003-07-22 12:35:17.000000000 -0400 @@ -335,7 +335,7 @@ $(objpfx)sprof: $(libdl) $(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o) SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"' -CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' -D'SLIBDIR="$(slibdir)"' +CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' -D'SLIBDIR="$(slibdir)"' -DIS_IN_ldconfig=1 CFLAGS-dl-cache.c = $(SYSCONF-FLAGS) CFLAGS-cache.c = $(SYSCONF-FLAGS) --- libc/elf/ldconfig.c.jj 2003-06-25 04:01:04.000000000 -0400 +++ libc/elf/ldconfig.c 2003-07-22 12:39:10.000000000 -0400 @@ -132,6 +132,9 @@ static const struct argp_option options[ { NULL, 0, NULL, 0, NULL, 0 } }; +#define PROCINFO_CLASS static +#include <dl-procinfo.c> + /* Short description of program. */ static const char doc[] = N_("Configure Dynamic Linker Run Time Bindings."); --- libc/sysdeps/generic/ldsodefs.h.jj 2003-06-11 18:24:33.000000000 -0400 +++ libc/sysdeps/generic/ldsodefs.h 2003-07-22 12:38:44.000000000 -0400 @@ -343,6 +343,7 @@ struct rtld_global /* Get architecture specific definitions. */ #define PROCINFO_DECL +#define PROCINFO_CLASS EXTERN #include <dl-procinfo.c> /* Structure describing the dynamic linker itself. */ --- libc/sysdeps/unix/sysv/linux/arm/dl-procinfo.c.jj 2002-04-03 01:54:28.000000000 -0500 +++ libc/sysdeps/unix/sysv/linux/arm/dl-procinfo.c 2003-07-22 12:46:16.000000000 -0400 @@ -1,5 +1,5 @@ /* Data for Linux/ARM version of processor capability information. - Copyright (C) 2001, 2002 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell <philb@gnu.org>, 2001. @@ -40,13 +40,14 @@ needed. */ -#ifdef PROCINFO_DECL -EXTERN +#ifndef PROCINFO_CLASS +#define PROCINFO_CLASS #endif + #if !defined PROCINFO_DECL && defined SHARED ._dl_arm_cap_flags #else -const char _dl_arm_cap_flags[8][10] +PROCINFO_CLASS const char _dl_arm_cap_flags[8][10] #endif #ifndef PROCINFO_DECL = { @@ -60,3 +61,4 @@ const char _dl_arm_cap_flags[8][10] #endif #undef PROCINFO_DECL +#undef PROCINFO_CLASS --- libc/sysdeps/unix/sysv/linux/i386/dl-procinfo.c.jj 2003-01-14 04:59:45.000000000 -0500 +++ libc/sysdeps/unix/sysv/linux/i386/dl-procinfo.c 2003-07-22 12:42:00.000000000 -0400 @@ -40,13 +40,14 @@ needed. */ -#ifdef PROCINFO_DECL -EXTERN +#ifndef PROCINFO_CLASS +#define PROCINFO_CLASS #endif + #if !defined PROCINFO_DECL && defined SHARED ._dl_x86_cap_flags #else -const char _dl_x86_cap_flags[32][8] +PROCINFO_CLASS const char _dl_x86_cap_flags[32][8] #endif #ifndef PROCINFO_DECL = { @@ -62,13 +63,10 @@ const char _dl_x86_cap_flags[32][8] , #endif -#ifdef PROCINFO_DECL -EXTERN -#endif #if !defined PROCINFO_DECL && defined SHARED ._dl_x86_platforms #else -const char _dl_x86_platforms[4][5] +PROCINFO_CLASS const char _dl_x86_platforms[4][5] #endif #ifndef PROCINFO_DECL = { @@ -82,3 +80,4 @@ const char _dl_x86_platforms[4][5] #endif #undef PROCINFO_DECL +#undef PROCINFO_CLASS --- libc/sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.c.jj 2002-02-01 14:04:37.000000000 -0500 +++ libc/sysdeps/unix/sysv/linux/sparc/sparc32/dl-procinfo.c 2003-07-22 12:46:02.000000000 -0400 @@ -1,5 +1,5 @@ /* Data for Linux/sparc32 version of processor capability information. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2002. @@ -40,13 +40,14 @@ needed. */ -#ifdef PROCINFO_DECL -EXTERN +#ifndef PROCINFO_CLASS +#define PROCINFO_CLASS #endif + #if !defined PROCINFO_DECL && defined SHARED ._dl_sparc32_cap_flags #else -const char _dl_sparc32_cap_flags[6][7] +PROCINFO_CLASS const char _dl_sparc32_cap_flags[6][7] #endif #ifndef PROCINFO_DECL = { @@ -60,3 +61,4 @@ const char _dl_sparc32_cap_flags[6][7] #endif #undef PROCINFO_DECL +#undef PROCINFO_CLASS --- libc/sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.c.jj 2002-02-01 14:04:15.000000000 -0500 +++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/dl-procinfo.c 2003-07-22 12:45:51.000000000 -0400 @@ -1,5 +1,5 @@ /* Data for Linux/sparc64 version of processor capability information. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2002. @@ -40,13 +40,14 @@ needed. */ -#ifdef PROCINFO_DECL -EXTERN +#ifndef PROCINFO_CLASS +#define PROCINFO_CLASS #endif + #if !defined PROCINFO_DECL && defined SHARED ._dl_sparc64_cap_flags #else -const char _dl_sparc64_cap_flags[6][7] +PROCINFO_CLASS const char _dl_sparc64_cap_flags[6][7] #endif #ifndef PROCINFO_DECL = { @@ -60,3 +61,4 @@ const char _dl_sparc64_cap_flags[6][7] #endif #undef PROCINFO_DECL +#undef PROCINFO_CLASS --- libc/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.c.jj 2003-07-22 12:35:17.000000000 -0400 +++ libc/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.c 2003-07-22 12:35:17.000000000 -0400 @@ -0,0 +1,5 @@ +#ifdef IS_IN_ldconfig +#include <sysdeps/unix/sysv/linux/i386/dl-procinfo.c> +#else +#include <sysdeps/generic/dl-procinfo.c> +#endif --- libc/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h.jj 2003-07-22 12:35:17.000000000 -0400 +++ libc/sysdeps/unix/sysv/linux/x86_64/dl-procinfo.h 2003-07-22 12:35:17.000000000 -0400 @@ -0,0 +1,5 @@ +#ifdef IS_IN_ldconfig +#include <sysdeps/unix/sysv/linux/i386/dl-procinfo.h> +#else +#include <sysdeps/generic/dl-procinfo.h> +#endif Jakub
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |