Update.
authorUlrich Drepper <drepper@redhat.com>
Wed, 13 Mar 2002 02:17:12 +0000 (02:17 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 13 Mar 2002 02:17:12 +0000 (02:17 +0000)
* stdio-common/itowa-digits.c (_itowa_lower_digits): Define as hidden.
(_itowa_upper_digits): Likewise.

* libio/stdio.c (_IO_stdin, _IO_stdout, _IO_stderr): Define as hidden.
* libio/libio.h [_LIBC] (_IO_stdin, _IO_stdout, _IO_stderr): Declare
as hidden.

* libio/libioP.h: Declare _IO_file_jumps_mmap, _IO_wfile_jumps,
_IO_wfile_jumps_mmap, _IO_proc_jumps, _IO_old_proc_jumps,
_IO_str_jumps, _IO_wstr_jumps, _IO_file_jumps_internal,
_IO_wfile_jumps_internal, and _IO_list_all_internal as hidden.

* gmon/gmon.c (__bb_head): Define as hidden.
* gmon/bb_exit_func.c (__bb_head): Declare as hidden.

* argp/argp-parse.c (_argp_hang): Define as static.

* include/libc-symbols.h (_INTVARDEF): Adjust for visibility
handling in latest compilers.

* inet/in6_addr.c (in6addr_any): Use INTVARDEF not INTDEF to
define alias.
* libio/fileops.c (_IO_file_jumps): Likewise.
* libio/stdfiles.c (_IO_list_all): Likewise.
* libio/wfileops.c (_IO_wfile_jumps): Likewise.

* malloc/malloc.h: Move __libc_malloc_initialized declaration to
include/malloc.h.
* include/malloc.h: Add __libc_malloc_initialized declaration
here.  Mark variable hidden.
* malloc/malloc.c: Include <malloc.h> not "malloc.h".

* elf/dl-open.c (__libc_argc): Declare as hidden.
(__libc_argv): Likewise.
* sysdeps/generic/wordexp.c (__libc_argc): Declare as hidden.
(__libc_argv): Likewise.
* sysdeps/mach/hurd/i386/init-first.c: Define __libc_argc and
__libc_argv as hidden.
* sysdeps/mach/hurd/mips/init-first.c: Likewise.
* sysdeps/mach/hurd/powerpc/init-first.c: Likewise.
* sysdeps/unix/sysv/aix/init-first.c: Likewise.
* sysdeps/unix/sysv/linux/init-first.c: Likewise.

23 files changed:
ChangeLog
argp/argp-parse.c
elf/dl-open.c
gmon/bb_exit_func.c
gmon/gmon.c
include/libc-symbols.h
include/malloc.h
inet/in6_addr.c
libio/fileops.c
libio/libio.h
libio/libioP.h
libio/stdfiles.c
libio/stdio.c
libio/wfileops.c
malloc/malloc.c
malloc/malloc.h
stdio-common/itowa-digits.c
sysdeps/generic/wordexp.c
sysdeps/mach/hurd/i386/init-first.c
sysdeps/mach/hurd/mips/init-first.c
sysdeps/mach/hurd/powerpc/init-first.c
sysdeps/unix/sysv/aix/init-first.c
sysdeps/unix/sysv/linux/init-first.c

index 4893a8d65f1ff0dd3d8cbabf7cd6c92819671110..356138259b0facfb3ab483631a1c01e52dc38bf6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,48 @@
 2002-03-12  Ulrich Drepper  <drepper@redhat.com>
 
+       * stdio-common/itowa-digits.c (_itowa_lower_digits): Define as hidden.
+       (_itowa_upper_digits): Likewise.
+
+       * libio/stdio.c (_IO_stdin, _IO_stdout, _IO_stderr): Define as hidden.
+       * libio/libio.h [_LIBC] (_IO_stdin, _IO_stdout, _IO_stderr): Declare
+       as hidden.
+
+       * libio/libioP.h: Declare _IO_file_jumps_mmap, _IO_wfile_jumps,
+       _IO_wfile_jumps_mmap, _IO_proc_jumps, _IO_old_proc_jumps,
+       _IO_str_jumps, _IO_wstr_jumps, _IO_file_jumps_internal,
+       _IO_wfile_jumps_internal, and _IO_list_all_internal as hidden.
+
+       * gmon/gmon.c (__bb_head): Define as hidden.
+       * gmon/bb_exit_func.c (__bb_head): Declare as hidden.
+
+       * argp/argp-parse.c (_argp_hang): Define as static.
+
+       * include/libc-symbols.h (_INTVARDEF): Adjust for visibility
+       handling in latest compilers.
+
+       * inet/in6_addr.c (in6addr_any): Use INTVARDEF not INTDEF to
+       define alias.
+       * libio/fileops.c (_IO_file_jumps): Likewise.
+       * libio/stdfiles.c (_IO_list_all): Likewise.
+       * libio/wfileops.c (_IO_wfile_jumps): Likewise.
+
+       * malloc/malloc.h: Move __libc_malloc_initialized declaration to
+       include/malloc.h.
+       * include/malloc.h: Add __libc_malloc_initialized declaration
+       here.  Mark variable hidden.
+       * malloc/malloc.c: Include <malloc.h> not "malloc.h".
+
+       * elf/dl-open.c (__libc_argc): Declare as hidden.
+       (__libc_argv): Likewise.
+       * sysdeps/generic/wordexp.c (__libc_argc): Declare as hidden.
+       (__libc_argv): Likewise.
+       * sysdeps/mach/hurd/i386/init-first.c: Define __libc_argc and
+       __libc_argv as hidden.
+       * sysdeps/mach/hurd/mips/init-first.c: Likewise.
+       * sysdeps/mach/hurd/powerpc/init-first.c: Likewise.
+       * sysdeps/unix/sysv/aix/init-first.c: Likewise.
+       * sysdeps/unix/sysv/linux/init-first.c: Likewise.
+
        * include/stdlib.h (__libc_drand48_data): Declare as hidden.
        * stdlib/drand48.c: Remove declaration of __libc_drand48_data here.
        * stdlib/erand48.c: Likewise.
index 02dbfac75da1ec2b82bbd30620ef3ea92ce2da97..5a5146fba3876ab7cd81a1ef84f3e2e784ad21e1 100644 (file)
@@ -1,5 +1,5 @@
 /* Hierarchial argument parsing, layered over getopt
-   Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1995-2000, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Miles Bader <miles@gnu.ai.mit.edu>.
 
 /* When argp is given the --HANG switch, _ARGP_HANG is set and argp will sleep
    for one second intervals, decrementing _ARGP_HANG until it's zero.  Thus
    you can force the program to continue by attaching a debugger and setting
-   it to 0 yourself.  */
+   it to 0 yourself.
+
+   XXX This variable used to be exported.  But there seems to be no
+   need, at least not inside libc.  */
+#ifdef _LIBC
+static
+#endif
 volatile int _argp_hang;
 
 #define OPT_PROGNAME   -2
index 5710ffb40ff0edceaf11fa905f0889d0786f169e..5a7198ff92b71b0aae24ab47a560b7da16eeac85 100644 (file)
@@ -42,8 +42,8 @@ weak_extern (BP_SYM (_dl_sysdep_start))
 
 extern int __libc_multiple_libcs;      /* Defined in init-first.c.  */
 
-extern int __libc_argc;
-extern char **__libc_argv;
+extern int __libc_argc attribute_hidden;
+extern char **__libc_argv attribute_hidden;
 
 extern char **__environ;
 
index ce61c75d6ebebe0a03321c4e002abd5bc61fb832..f0d1d8576c85b5f804ba30c4b76f1e2ba8c93d79 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996,1997,1998,2000,2001,2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by David Mosberger (davidm@cs.arizona.edu).
 
@@ -31,6 +31,9 @@
 #define OUT_NAME       "gmon.out"
 
 
+extern struct __bb *__bb_head attribute_hidden;
+
+
 void
 __bb_exit_func (void)
 {
index 3380932e7c4b0097cfdc6afed27acfa657124ecd..f0188a9d309c4cbd5960762147da9c94a3c9def1 100644 (file)
@@ -47,7 +47,8 @@
 # include <wchar.h>
 #endif
 
-struct __bb *__bb_head;        /*  Head of basic-block list or NULL. */
+/*  Head of basic-block list or NULL. */
+struct __bb *__bb_head attribute_hidden;
 
 struct gmonparam _gmonparam attribute_hidden = { GMON_PROF_OFF };
 
index bc1c24033fa8dbd76f8cab8ee867dc6850e3a69c..07badec8026c31aa8831d3148e100b12adbf103f 100644 (file)
 # define INTVARDEF(name) \
   _INTVARDEF(name, name##_internal)
 # define _INTVARDEF(name, aliasname) \
-  extern __typeof (name) aliasname __attribute__ ((visibility ("hidden"))); \
-  strong_alias (name, name##_internal)
+  extern __typeof (name) aliasname __attribute__ ((alias (#name), \
+                                                  visibility ("hidden")));
 # define INTDEF2(name, newname) strong_alias (name, newname##_internal)
 #else
 # define INTUSE(name) name
index 448e0a8c6bc69f5d647a500f350fe33de55a1ba9..eb2afb933041d096b841d8c13b7164384fba848b 100644 (file)
@@ -1 +1,11 @@
+#ifndef _MALLOC_H
 #include <malloc/malloc.h>
+
+
+/* In the GNU libc we rename the global variable
+   `__malloc_initialized' to `__libc_malloc_initialized'.  */
+#define __malloc_initialized __libc_malloc_initialized
+/* Nonzero if the malloc is already initialized.  */
+extern int __malloc_initialized attribute_hidden;
+
+#endif
index 5f004fbf97441565b5ace48f3ddeda63166b8fbe..0035509f9884b0fcaee4f606a95f497b18767a8e 100644 (file)
@@ -21,6 +21,6 @@
 
 const struct in6_addr in6addr_any =
 { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } };
-INTDEF(in6addr_any)
+INTVARDEF(in6addr_any)
 const struct in6_addr in6addr_loopback =
 { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } };
index dd8960ef038e553f28c0aa81806ef7096b416749..eaf590908a3442274c0f627fa9f6eca4b1514628 100644 (file)
@@ -1270,7 +1270,7 @@ struct _IO_jump_t _IO_file_jumps =
   JUMP_INIT(showmanyc, _IO_default_showmanyc),
   JUMP_INIT(imbue, _IO_default_imbue)
 };
-INTDEF(_IO_file_jumps)
+INTVARDEF(_IO_file_jumps)
 
 struct _IO_jump_t _IO_file_jumps_mmap =
 {
index 1bd31894e88630424e9e9c45a559eab88e2eee70..c8231df3abae29d230bf28a3d110e78d88ec000d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1995, 1997-2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1995, 1997-2001, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Per Bothner <bothner@cygnus.com>.
 
@@ -331,9 +331,9 @@ extern struct _IO_FILE_plus _IO_2_1_stderr_;
 #define _IO_stdout ((_IO_FILE*)(&_IO_2_1_stdout_))
 #define _IO_stderr ((_IO_FILE*)(&_IO_2_1_stderr_))
 #else
-extern _IO_FILE *_IO_stdin;
-extern _IO_FILE *_IO_stdout;
-extern _IO_FILE *_IO_stderr;
+extern _IO_FILE *_IO_stdin attribute_hidden;
+extern _IO_FILE *_IO_stdout attribute_hidden;
+extern _IO_FILE *_IO_stderr attribute_hidden;
 #endif
 
 
index b40e9e69eb42aa469d388ee9c50c69d8e687bafe..f3a2d97e2abba8c3aea5aee76df4d47c3702d24a 100644 (file)
@@ -426,15 +426,15 @@ extern int _IO_default_showmanyc __P ((_IO_FILE *));
 extern void _IO_default_imbue __P ((_IO_FILE *, void *));
 
 extern struct _IO_jump_t _IO_file_jumps;
-extern struct _IO_jump_t _IO_file_jumps_mmap;
-extern struct _IO_jump_t _IO_wfile_jumps;
-extern struct _IO_jump_t _IO_wfile_jumps_mmap;
-extern struct _IO_jump_t _IO_old_file_jumps;
+extern struct _IO_jump_t _IO_file_jumps_mmap attribute_hidden;
+extern struct _IO_jump_t _IO_wfile_jumps attribute_hidden;
+extern struct _IO_jump_t _IO_wfile_jumps_mmap attribute_hidden;
+extern struct _IO_jump_t _IO_old_file_jumps attribute_hidden;
 extern struct _IO_jump_t _IO_streambuf_jumps;
-extern struct _IO_jump_t _IO_proc_jumps;
-extern struct _IO_jump_t _IO_old_proc_jumps;
-extern struct _IO_jump_t _IO_str_jumps;
-extern struct _IO_jump_t _IO_wstr_jumps;
+extern struct _IO_jump_t _IO_proc_jumps attribute_hidden;
+extern struct _IO_jump_t _IO_old_proc_jumps attribute_hidden;
+extern struct _IO_jump_t _IO_str_jumps attribute_hidden;
+extern struct _IO_jump_t _IO_wstr_jumps attribute_hidden;
 extern struct _IO_codecvt __libio_codecvt;
 extern int _IO_do_write __P ((_IO_FILE *, const char *, _IO_size_t));
 extern int _IO_new_do_write __P ((_IO_FILE *, const char *, _IO_size_t));
@@ -683,10 +683,10 @@ extern _IO_off64_t _IO_str_seekoff_internal __P ((_IO_FILE *, _IO_off64_t,
 extern void _IO_str_init_static_internal __P ((struct _IO_strfile_ *, char *,
                                               int, char *));
 
-extern struct _IO_jump_t _IO_file_jumps_internal;
-extern struct _IO_jump_t _IO_wfile_jumps_internal;
+extern struct _IO_jump_t _IO_file_jumps_internal attribute_hidden;
+extern struct _IO_jump_t _IO_wfile_jumps_internal attribute_hidden;
 
-extern struct _IO_FILE_plus *_IO_list_all_internal;
+extern struct _IO_FILE_plus *_IO_list_all_internal attribute_hidden;
 
 extern void _IO_link_in_internal __P ((struct _IO_FILE_plus *));
 extern int _IO_sputbackc_internal __P ((_IO_FILE *, int));
index dd4be042073726bd3d170a21b6b712cd41b64ffd..cbc1407900b634072033f24eb677173c89561ea8 100644 (file)
@@ -71,4 +71,4 @@ DEF_STDFILE(_IO_2_1_stdout_, 1, &_IO_2_1_stdin_, _IO_NO_READS);
 DEF_STDFILE(_IO_2_1_stderr_, 2, &_IO_2_1_stdout_, _IO_NO_READS+_IO_UNBUFFERED);
 
 struct _IO_FILE_plus *_IO_list_all = &_IO_2_1_stderr_;
-INTDEF(_IO_list_all)
+INTVARDEF(_IO_list_all)
index 9a594963e5a6a1ac009d1425f3f51478b8a29086..64a8ab2d5732c6a5ee5c5b951c05525aadfbfb5f 100644 (file)
@@ -39,7 +39,11 @@ _IO_FILE *stderr = (FILE *) &_IO_2_1_stderr_;
 #undef _IO_stdout
 #undef _IO_stderr
 #ifdef _LIBC
-strong_alias (stdin, _IO_stdin);
-strong_alias (stdout, _IO_stdout);
-strong_alias (stderr, _IO_stderr);
+# define AL(name) AL2 (name, _IO_##name)
+# define AL2(name, al) \
+  extern __typeof (name) al __attribute__ ((alias (#name),                   \
+                                           visibility ("hidden")))
+AL(stdin);
+AL(stdout);
+AL(stderr);
 #endif
index d0259b097ebe5e3939e183c62fa0f14ac61dbfa4..504c799010080d0db1eb7b9e4eb3cbcadcaaf3e8 100644 (file)
@@ -862,7 +862,7 @@ struct _IO_jump_t _IO_wfile_jumps =
   JUMP_INIT(showmanyc, _IO_default_showmanyc),
   JUMP_INIT(imbue, _IO_default_imbue)
 };
-INTDEF(_IO_wfile_jumps)
+INTVARDEF(_IO_wfile_jumps)
 
 
 struct _IO_jump_t _IO_wfile_jumps_mmap =
index b1ab6e9f7eb8f7e116937a173f8de8a0bfedafb0..7414c705a9007f9b3e71d9e6828247ee4ce76a56 100644 (file)
@@ -1401,7 +1401,7 @@ void     public_mSTATs();
 };  /* end of extern "C" */
 #endif
 
-#include "malloc.h"
+#include <malloc.h>
 #include "thread-m.h"
 
 #ifndef BOUNDED_N
index aaa95b3a2cf0adf4379ac3244bf3e1a8b0569816..5ddd780958cfc6647c318fb0250009777f99e49c 100644 (file)
@@ -1,5 +1,5 @@
 /* Prototypes and definition for malloc implementation.
-   Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
 extern "C" {
 #endif
 
-/* Nonzero if the malloc is already initialized.  */
-#ifdef _LIBC
-/* In the GNU libc we rename the global variable
-   `__malloc_initialized' to `__libc_malloc_initialized'.  */
-# define __malloc_initialized __libc_malloc_initialized
-#endif
-extern int __malloc_initialized;
-
 /* Allocate SIZE bytes of memory.  */
 extern __malloc_ptr_t malloc __MALLOC_P ((size_t __size)) __attribute_malloc__;
 
index c6c88e0e97fa6bb323858da533ed3cc4b52a6d03..ce5b9c3b9216a1a54e6abf438d86f21338518d8c 100644 (file)
@@ -1,5 +1,5 @@
 /* Digits.
-   Copyright (C) 1994, 1995, 1996, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1994, 1995, 1996, 1999, 2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -20,8 +20,8 @@
 #include <wchar.h>
 
 /* Lower-case digits.  */
-const wchar_t _itowa_lower_digits[36]
+const wchar_t _itowa_lower_digits[36] attribute_hidden
        = L"0123456789abcdefghijklmnopqrstuvwxyz";
 /* Upper-case digits.  */
-const wchar_t _itowa_upper_digits[36]
+const wchar_t _itowa_upper_digits[36] attribute_hidden
        = L"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
index 75a1d26c91c8bd2cf0cebafe71951a577f6e2a44..e3e31451c10c82381a6ee77bb4d3a7eac7070c78 100644 (file)
@@ -1,5 +1,5 @@
 /* POSIX.2 wordexp implementation.
-   Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Tim Waugh <tim@cyberelk.demon.co.uk>.
 
@@ -56,8 +56,8 @@
  */
 
 /* These variables are defined and initialized in the startup code.  */
-extern int __libc_argc;
-extern char **__libc_argv;
+extern int __libc_argc attribute_hidden;
+extern char **__libc_argv attribute_hidden;
 
 /* Some forward declarations */
 static int parse_dollars (char **word, size_t *word_length, size_t *max_length,
index ad32b30af052448ce3fa8a50c9a53901a1dc00c8..56db8378428ccb1748cd3e244b503453df01f40b 100644 (file)
@@ -47,8 +47,8 @@ int __libc_enable_secure;
 #endif
 int __libc_multiple_libcs = 1;
 
-extern int __libc_argc;
-extern char **__libc_argv;
+extern int __libc_argc attribute_hidden;
+extern char **__libc_argv attribute_hidden;
 extern char **_dl_argv;
 
 void *(*_cthread_init_routine) (void); /* Returns new SP to use.  */
index 07b8e9e38c46443f20c388858f3859071fb8f576..dbcad4b481b458b7c784ac00fa3ca06d36da3552 100644 (file)
@@ -31,7 +31,7 @@ extern void __init_misc (int, char **, char **);
 #ifdef USE_NONOPTION_FLAGS
 extern void __getopt_clean_environment (char **);
 #endif
-#ifndef SHARED 
+#ifndef SHARED
 extern void _dl_non_dynamic_init (void) internal_function;
 #endif
 extern void __libc_global_ctors (void);
@@ -42,8 +42,8 @@ unsigned long int __hurd_threadvar_stack_mask;
 
 int __libc_multiple_libcs = 1;
 
-int __libc_argc;
-char **__libc_argv;
+int __libc_argc attribute_hidden;
+char **__libc_argv attribute_hidden;
 
 void *(*_cthread_init_routine) (void); /* Returns new SP to use.  */
 void (*_cthread_exit_routine) (int status) __attribute__ ((__noreturn__));
index 18e824a487eb4253663808ced03fd120e58fca95..80aa61524e19879cbe8fa7221b4d388eb5f55d2e 100644 (file)
@@ -33,7 +33,7 @@ extern void __init_misc (int, char **, char **);
 #ifdef USE_NONOPTION_FLAGS
 extern void __getopt_clean_environment (char **);
 #endif
-#ifndef SHARED 
+#ifndef SHARED
 extern void _dl_non_dynamic_init (void) internal_function;
 #endif
 extern void __libc_global_ctors (void);
@@ -47,8 +47,8 @@ int __libc_enable_secure;
 #endif
 int __libc_multiple_libcs = 1;
 
-extern int __libc_argc;
-extern char **__libc_argv;
+extern int __libc_argc attribute_hidden;
+extern char **__libc_argv attribute_hidden;
 extern char **_dl_argv;
 
 void *(*_cthread_init_routine) (void); /* Returns new SP to use.  */
index 2a60a927fc0904daf9f3f4266a41faa9b646b2a0..7b4773b633a4c12cdbc4834b26f5643590242a9e 100644 (file)
@@ -46,8 +46,8 @@ int __libc_multiple_libcs = 1;
 
 /* Remember the command line argument and enviroment contents for
    later calls of initializers for dynamic libraries.  */
-int __libc_argc;
-char **__libc_argv;
+int __libc_argc attribute_hidden;
+char **__libc_argv attribute_hidden;
 
 
 static void
index 3a7f4ffba736e2de65aac776aa97a819dccb09e4..9dbf2062ab8a6e188330adfc81fc5b7280cc042a 100644 (file)
@@ -45,8 +45,8 @@ int __libc_multiple_libcs = 1;
 
 /* Remember the command line argument and enviroment contents for
    later calls of initializers for dynamic libraries.  */
-int __libc_argc;
-char **__libc_argv;
+int __libc_argc attribute_hidden;
+char **__libc_argv attribute_hidden;
 
 
 static void