summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-03-10 16:20:23 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-03-10 16:20:23 +0000
commit42c1ad48fa946f00d67d0b023f50e5d6d8fc293f (patch)
treef510bb36f58711b809103832fa826b0de13df593
parent7747ec45650949ca4712be8e2cbc0588c0922982 (diff)
Remove all non-constant libc_hidden_data_def(), it is too unreliable, sorry, most of global data relocations are back
-rw-r--r--libc/inet/herror.c1
-rw-r--r--libc/inet/resolv.c2
-rw-r--r--libc/inet/rpc/auth_unix.c1
-rw-r--r--libc/inet/rpc/clnt_tcp.c1
-rw-r--r--libc/inet/rpc/clnt_udp.c1
-rw-r--r--libc/inet/rpc/clnt_unix.c1
-rw-r--r--libc/inet/rpc/rcmd.c1
-rw-r--r--libc/inet/rpc/rpc_private.h1
-rw-r--r--libc/inet/rpc/svc_tcp.c1
-rw-r--r--libc/inet/rpc/svc_udp.c1
-rw-r--r--libc/inet/rpc/svc_unix.c1
-rw-r--r--libc/inet/rpc/xdr.c1
-rw-r--r--libc/inet/rpc/xdr_array.c1
-rw-r--r--libc/inet/rpc/xdr_rec.c1
-rw-r--r--libc/inet/rpc/xdr_reference.c1
-rw-r--r--libc/misc/assert/__assert.c1
-rw-r--r--libc/misc/error/err.c1
-rw-r--r--libc/misc/error/error.c2
-rw-r--r--libc/misc/gnu/obstack.c5
-rw-r--r--libc/misc/internals/__uClibc_main.c14
-rw-r--r--libc/misc/locale/locale.c11
-rw-r--r--libc/misc/time/time.c6
-rw-r--r--libc/misc/wchar/wchar.c3
-rw-r--r--libc/misc/wctype/_wctype.c3
-rw-r--r--libc/misc/wordexp/wordexp.c2
-rw-r--r--libc/stdio/__fsetlocking.c3
-rw-r--r--libc/stdio/_fopen.c4
-rw-r--r--libc/stdio/_fpmaxtostr.c3
-rw-r--r--libc/stdio/_scanf.c3
-rw-r--r--libc/stdio/_stdio.c11
-rw-r--r--libc/stdio/_stdio.h6
-rw-r--r--libc/stdio/_uintmaxtostr.c3
-rw-r--r--libc/stdio/_vfprintf.c8
-rw-r--r--libc/stdio/fflush.c1
-rw-r--r--libc/stdio/gets.c4
-rw-r--r--libc/stdio/perror.c1
-rw-r--r--libc/stdlib/_atexit.c2
-rw-r--r--libc/stdlib/_strtod.c3
-rw-r--r--libc/stdlib/getenv.c1
-rw-r--r--libc/stdlib/malloc-standard/mallinfo.c1
-rw-r--r--libc/stdlib/malloc-standard/malloc.c1
-rw-r--r--libc/stdlib/malloc-standard/malloc.h1
-rw-r--r--libc/stdlib/malloc/malloc.h1
-rw-r--r--libc/stdlib/setenv.c1
-rw-r--r--libc/stdlib/stdlib.c3
-rw-r--r--libc/string/_collate.c2
-rw-r--r--libc/string/psignal.c1
-rw-r--r--libc/sysdeps/linux/alpha/brk.S2
-rw-r--r--libc/sysdeps/linux/arm/brk.c3
-rw-r--r--libc/sysdeps/linux/bfin/brk.c3
-rw-r--r--libc/sysdeps/linux/common/getpagesize.c1
-rw-r--r--libc/sysdeps/linux/common/sbrk.c1
-rw-r--r--libc/sysdeps/linux/cris/__init_brk.c3
-rw-r--r--libc/sysdeps/linux/cris/brk.c1
-rw-r--r--libc/sysdeps/linux/cris/sbrk.c1
-rw-r--r--libc/sysdeps/linux/frv/__init_brk.c3
-rw-r--r--libc/sysdeps/linux/frv/brk.c1
-rw-r--r--libc/sysdeps/linux/frv/sbrk.c1
-rw-r--r--libc/sysdeps/linux/h8300/brk.c3
-rw-r--r--libc/sysdeps/linux/hppa/brk.c3
-rw-r--r--libc/sysdeps/linux/i386/brk.c3
-rw-r--r--libc/sysdeps/linux/ia64/brk.S3
-rw-r--r--libc/sysdeps/linux/m68k/brk.c3
-rw-r--r--libc/sysdeps/linux/mips/brk.c3
-rw-r--r--libc/sysdeps/linux/nios/brk.c3
-rw-r--r--libc/sysdeps/linux/nios2/brk.c4
-rw-r--r--libc/sysdeps/linux/powerpc/brk.S7
-rw-r--r--libc/sysdeps/linux/sh/__init_brk.c3
-rw-r--r--libc/sysdeps/linux/sh/brk.c1
-rw-r--r--libc/sysdeps/linux/sh/sbrk.c1
-rw-r--r--libc/sysdeps/linux/sh64/__init_brk.c3
-rw-r--r--libc/sysdeps/linux/sh64/brk.c1
-rw-r--r--libc/sysdeps/linux/sh64/sbrk.c1
-rw-r--r--libc/sysdeps/linux/sparc/brk.c3
-rw-r--r--libc/sysdeps/linux/vax/brk.c3
-rw-r--r--libc/sysdeps/linux/x86_64/brk.c3
-rw-r--r--libc/unistd/exec.c1
-rw-r--r--libc/unistd/getopt.c1
-rw-r--r--libc/unistd/getpass.c2
-rw-r--r--libm/k_standard.c1
-rw-r--r--libm/s_lib_version.c2
81 files changed, 9 insertions, 197 deletions
diff --git a/libc/inet/herror.c b/libc/inet/herror.c
index 66626c0a8..063f6e93e 100644
--- a/libc/inet/herror.c
+++ b/libc/inet/herror.c
@@ -25,7 +25,6 @@
libc_hidden_proto(fprintf)
libc_hidden_proto(__h_errno_location)
-libc_hidden_proto(stderr)
static const char *error_msg = "Resolver error";
static const char *const h_errlist[] = {
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c
index 9b9a42aa3..885413db8 100644
--- a/libc/inet/resolv.c
+++ b/libc/inet/resolv.c
@@ -237,7 +237,6 @@ extern char * __searchdomain[MAX_SEARCH] attribute_hidden;
#ifdef __UCLIBC_HAS_THREADS__
# include <pthread.h>
extern pthread_mutex_t __resolv_lock;
-libc_hidden_proto(__resolv_lock)
#endif
#define BIGLOCK __pthread_mutex_lock(&__resolv_lock)
#define BIGUNLOCK __pthread_mutex_unlock(&__resolv_lock)
@@ -1022,7 +1021,6 @@ char * __searchdomain[MAX_SEARCH];
#ifdef __UCLIBC_HAS_THREADS__
# include <pthread.h>
pthread_mutex_t __resolv_lock = PTHREAD_MUTEX_INITIALIZER;
-libc_hidden_data_def(__resolv_lock)
#endif
/*
diff --git a/libc/inet/rpc/auth_unix.c b/libc/inet/rpc/auth_unix.c
index 7644ab276..80b60b56b 100644
--- a/libc/inet/rpc/auth_unix.c
+++ b/libc/inet/rpc/auth_unix.c
@@ -69,7 +69,6 @@ libc_hidden_proto(gettimeofday)
libc_hidden_proto(fputs)
libc_hidden_proto(perror)
libc_hidden_proto(abort)
-libc_hidden_proto(stderr)
#ifdef USE_IN_LIBIO
libc_hidden_proto(fwprintf)
#endif
diff --git a/libc/inet/rpc/clnt_tcp.c b/libc/inet/rpc/clnt_tcp.c
index 6d19df31c..23e4ca863 100644
--- a/libc/inet/rpc/clnt_tcp.c
+++ b/libc/inet/rpc/clnt_tcp.c
@@ -85,7 +85,6 @@ libc_hidden_proto(bindresvport)
libc_hidden_proto(poll)
libc_hidden_proto(fputs)
libc_hidden_proto(__rpc_thread_createerr)
-libc_hidden_proto(stderr)
#ifdef USE_IN_LIBIO
libc_hidden_proto(fwprintf)
#endif
diff --git a/libc/inet/rpc/clnt_udp.c b/libc/inet/rpc/clnt_udp.c
index 9b01d2751..9e3444069 100644
--- a/libc/inet/rpc/clnt_udp.c
+++ b/libc/inet/rpc/clnt_udp.c
@@ -84,7 +84,6 @@ libc_hidden_proto(recvmsg)
libc_hidden_proto(poll)
libc_hidden_proto(fputs)
libc_hidden_proto(__rpc_thread_createerr)
-libc_hidden_proto(stderr)
extern u_long _create_xid (void) attribute_hidden;
diff --git a/libc/inet/rpc/clnt_unix.c b/libc/inet/rpc/clnt_unix.c
index c5e949db6..82f994e51 100644
--- a/libc/inet/rpc/clnt_unix.c
+++ b/libc/inet/rpc/clnt_unix.c
@@ -87,7 +87,6 @@ libc_hidden_proto(sendmsg)
libc_hidden_proto(poll)
libc_hidden_proto(fputs)
libc_hidden_proto(__rpc_thread_createerr)
-libc_hidden_proto(stderr)
extern u_long _create_xid (void) attribute_hidden;
diff --git a/libc/inet/rpc/rcmd.c b/libc/inet/rpc/rcmd.c
index b4fe8cfe7..ee47cf4f5 100644
--- a/libc/inet/rpc/rcmd.c
+++ b/libc/inet/rpc/rcmd.c
@@ -132,7 +132,6 @@ libc_hidden_proto(fopen)
libc_hidden_proto(fclose)
libc_hidden_proto(fprintf)
libc_hidden_proto(__h_errno_location)
-libc_hidden_proto(stderr)
#ifdef __UCLIBC_HAS_XLOCALE__
libc_hidden_proto(__ctype_b_loc)
libc_hidden_proto(__ctype_tolower_loc)
diff --git a/libc/inet/rpc/rpc_private.h b/libc/inet/rpc/rpc_private.h
index 4826d362b..15250059a 100644
--- a/libc/inet/rpc/rpc_private.h
+++ b/libc/inet/rpc/rpc_private.h
@@ -5,7 +5,6 @@
extern u_long _create_xid (void) attribute_hidden;
libc_hidden_proto(__rpc_thread_createerr)
-libc_hidden_proto(stderr)
/*
* Multi-threaded support
diff --git a/libc/inet/rpc/svc_tcp.c b/libc/inet/rpc/svc_tcp.c
index c94f2de07..035119d7e 100644
--- a/libc/inet/rpc/svc_tcp.c
+++ b/libc/inet/rpc/svc_tcp.c
@@ -83,7 +83,6 @@ libc_hidden_proto(listen)
libc_hidden_proto(fputs)
libc_hidden_proto(fclose)
libc_hidden_proto(abort)
-libc_hidden_proto(stderr)
/*
* Ops vector for TCP/IP based rpc service handle
diff --git a/libc/inet/rpc/svc_udp.c b/libc/inet/rpc/svc_udp.c
index 53ef7ab35..d2ed68d1b 100644
--- a/libc/inet/rpc/svc_udp.c
+++ b/libc/inet/rpc/svc_udp.c
@@ -81,7 +81,6 @@ libc_hidden_proto(recvmsg)
libc_hidden_proto(sendmsg)
libc_hidden_proto(fputs)
libc_hidden_proto(fprintf)
-libc_hidden_proto(stderr)
#define rpc_buffer(xprt) ((xprt)->xp_p1)
#ifndef MAX
diff --git a/libc/inet/rpc/svc_unix.c b/libc/inet/rpc/svc_unix.c
index d91a9acbb..1683bd3ba 100644
--- a/libc/inet/rpc/svc_unix.c
+++ b/libc/inet/rpc/svc_unix.c
@@ -82,7 +82,6 @@ libc_hidden_proto(accept)
libc_hidden_proto(listen)
libc_hidden_proto(fputs)
libc_hidden_proto(abort)
-libc_hidden_proto(stderr)
/*
* Ops vector for AF_UNIX based rpc service handle
diff --git a/libc/inet/rpc/xdr.c b/libc/inet/rpc/xdr.c
index 34787a898..e8009910f 100644
--- a/libc/inet/rpc/xdr.c
+++ b/libc/inet/rpc/xdr.c
@@ -58,7 +58,6 @@ libc_hidden_proto(fwprintf)
libc_hidden_proto(strlen)
libc_hidden_proto(fputs)
-libc_hidden_proto(stderr)
/*
* constants specific to the xdr "protocol"
diff --git a/libc/inet/rpc/xdr_array.c b/libc/inet/rpc/xdr_array.c
index ddafc63b7..5f21fb29e 100644
--- a/libc/inet/rpc/xdr_array.c
+++ b/libc/inet/rpc/xdr_array.c
@@ -57,7 +57,6 @@ libc_hidden_proto(fwprintf)
libc_hidden_proto(memset)
libc_hidden_proto(fputs)
libc_hidden_proto(xdr_u_int)
-libc_hidden_proto(stderr)
#define LASTUNSIGNED ((u_int)0-1)
diff --git a/libc/inet/rpc/xdr_rec.c b/libc/inet/rpc/xdr_rec.c
index 99e6fe9c3..5f9e2b1fe 100644
--- a/libc/inet/rpc/xdr_rec.c
+++ b/libc/inet/rpc/xdr_rec.c
@@ -63,7 +63,6 @@ libc_hidden_proto(fwprintf)
libc_hidden_proto(memcpy)
libc_hidden_proto(fputs)
libc_hidden_proto(lseek)
-libc_hidden_proto(stderr)
static bool_t xdrrec_getlong (XDR *, long *);
static bool_t xdrrec_putlong (XDR *, const long *);
diff --git a/libc/inet/rpc/xdr_reference.c b/libc/inet/rpc/xdr_reference.c
index 842d54426..7201def7a 100644
--- a/libc/inet/rpc/xdr_reference.c
+++ b/libc/inet/rpc/xdr_reference.c
@@ -58,7 +58,6 @@ libc_hidden_proto(fwprintf)
libc_hidden_proto(memset)
libc_hidden_proto(xdr_bool)
libc_hidden_proto(fputs)
-libc_hidden_proto(stderr)
#define LASTUNSIGNED ((u_int)0-1)
diff --git a/libc/misc/assert/__assert.c b/libc/misc/assert/__assert.c
index 4282812a5..1ab84fc56 100644
--- a/libc/misc/assert/__assert.c
+++ b/libc/misc/assert/__assert.c
@@ -35,7 +35,6 @@
libc_hidden_proto(fprintf)
libc_hidden_proto(abort)
-libc_hidden_proto(stderr)
/* Get the prototype from assert.h as a double-check. */
#undef NDEBUG
diff --git a/libc/misc/error/err.c b/libc/misc/error/err.c
index 00e74ce61..cd331500a 100644
--- a/libc/misc/error/err.c
+++ b/libc/misc/error/err.c
@@ -29,7 +29,6 @@ libc_hidden_proto(vfprintf)
libc_hidden_proto(__xpg_strerror_r)
libc_hidden_proto(exit)
libc_hidden_proto(vfprintf)
-libc_hidden_proto(stderr)
static void vwarn_work(const char *format, va_list args, int showerr)
{
diff --git a/libc/misc/error/error.c b/libc/misc/error/error.c
index 3e44a01ee..bad1843e6 100644
--- a/libc/misc/error/error.c
+++ b/libc/misc/error/error.c
@@ -35,8 +35,6 @@ libc_hidden_proto(vfprintf)
libc_hidden_proto(fflush)
libc_hidden_proto(fputc)
libc_hidden_proto(__fputc_unlocked)
-libc_hidden_proto(stdout)
-libc_hidden_proto(stderr)
/* This variable is incremented each time `error' is called. */
unsigned int error_message_count = 0;
diff --git a/libc/misc/gnu/obstack.c b/libc/misc/gnu/obstack.c
index 99311183f..5fc031555 100644
--- a/libc/misc/gnu/obstack.c
+++ b/libc/misc/gnu/obstack.c
@@ -89,7 +89,6 @@ union fooround {long x; double d;};
abort gracefully or use longjump - but shouldn't return. This
variable by default points to the internal function
`print_and_abort'. */
-libc_hidden_proto(obstack_alloc_failed_handler)
# if defined __STDC__ && __STDC__
static void print_and_abort (void);
void (*obstack_alloc_failed_handler) (void) = print_and_abort;
@@ -97,7 +96,6 @@ void (*obstack_alloc_failed_handler) (void) = print_and_abort;
static void print_and_abort ();
void (*obstack_alloc_failed_handler) () = print_and_abort;
# endif
-libc_hidden_data_def(obstack_alloc_failed_handler)
/* Exit value used when `print_and_abort' is used. */
@@ -111,14 +109,11 @@ libc_hidden_data_def(obstack_alloc_failed_handler)
libc_hidden_proto(fprintf)
libc_hidden_proto(abort)
libc_hidden_proto(exit)
-libc_hidden_proto(stderr)
#ifdef __UCLIBC_HAS_WCHAR__
libc_hidden_proto(fwprintf)
#endif
-libc_hidden_proto(obstack_exit_failure)
int obstack_exit_failure = EXIT_FAILURE;
-libc_hidden_data_def(obstack_exit_failure)
/* The non-GNU-C macros copy the obstack into this global variable
to avoid multiple evaluation. */
diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c
index a63345d68..869c9e178 100644
--- a/libc/misc/internals/__uClibc_main.c
+++ b/libc/misc/internals/__uClibc_main.c
@@ -113,23 +113,15 @@ strong_alias (__progname_full, program_invocation_name)
#endif
/*
- * Declare the __environ global variable and create a weak alias environ.
- * Note: Apparently we must initialize __environ to ensure that the weak
+ * Declare the __environ global variable and create a strong alias environ.
+ * Note: Apparently we must initialize __environ to ensure that the strong
* environ symbol is also included.
*/
-libc_hidden_proto(__environ)
char **__environ = 0;
-libc_hidden_data_def(__environ)
-#ifdef __USE_GNU
-/* psm: arm segfaults with strong_alias, although defined */
-weak_alias(__environ,environ)
-#endif
+strong_alias(__environ,environ)
/* TODO: don't export __pagesize; we cant now because libpthread uses it */
-extern size_t __pagesize;
-libc_hidden_proto(__pagesize)
size_t __pagesize = 0;
-libc_hidden_data_def(__pagesize)
#ifndef O_NOFOLLOW
# define O_NOFOLLOW 0
diff --git a/libc/misc/locale/locale.c b/libc/misc/locale/locale.c
index e53731e94..95b0917df 100644
--- a/libc/misc/locale/locale.c
+++ b/libc/misc/locale/locale.c
@@ -148,10 +148,6 @@ extern void _locale_init_l(__locale_t base) attribute_hidden;
#include <langinfo.h>
#include <nl_types.h>
-#ifdef __UCLIBC_HAS_LOCALE__
-libc_hidden_proto(__global_locale)
-#endif
-
/**********************************************************************/
#ifdef L_setlocale
@@ -377,12 +373,9 @@ libc_hidden_proto(__ctype_toupper)
__uclibc_locale_t __global_locale_data;
__locale_t __global_locale = &__global_locale_data;
-libc_hidden_data_def(__global_locale)
#ifdef __UCLIBC_HAS_XLOCALE__
-libc_hidden_proto(__curlocale_var)
__locale_t __curlocale_var = &__global_locale_data;
-libc_hidden_data_def(__curlocale_var)
#endif
/*----------------------------------------------------------------------*/
@@ -1386,8 +1379,6 @@ void freelocale(__locale_t dataset)
/**********************************************************************/
#ifdef L_uselocale
-libc_hidden_proto(__curlocale_var)
-
libc_hidden_proto(uselocale)
__locale_t uselocale(__locale_t dataset)
{
@@ -1420,8 +1411,6 @@ libc_hidden_def(uselocale)
#ifdef __UCLIBC_HAS_THREADS__
-libc_hidden_proto(__curlocale_var)
-
__locale_t weak_const_function __curlocale(void)
{
return __curlocale_var; /* This is overriden by the thread version. */
diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c
index 9cc59d008..f95ad2351 100644
--- a/libc/misc/time/time.c
+++ b/libc/misc/time/time.c
@@ -1715,15 +1715,9 @@ static const char vals[] = {
#define DEFAULT_RULES (vals + 22)
/* Initialize to UTC. */
-libc_hidden_proto(daylight)
int daylight = 0;
-libc_hidden_data_def(daylight)
-libc_hidden_proto(timezone)
long timezone = 0;
-libc_hidden_data_def(timezone)
-libc_hidden_proto(tzname)
char *tzname[2] = { (char *) UTC, (char *) (UTC-1) };
-libc_hidden_data_def(tzname)
#ifdef __UCLIBC_HAS_THREADS__
attribute_hidden pthread_mutex_t _time_tzlock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
diff --git a/libc/misc/wchar/wchar.c b/libc/misc/wchar/wchar.c
index a795986e8..91a78fb22 100644
--- a/libc/misc/wchar/wchar.c
+++ b/libc/misc/wchar/wchar.c
@@ -111,9 +111,6 @@
#include <wchar.h>
#include <bits/uClibc_uwchar.h>
-#ifdef __UCLIBC_HAS_LOCALE__
-libc_hidden_proto(__global_locale)
-#endif
/**********************************************************************/
#ifdef __UCLIBC_HAS_LOCALE__
#ifdef __UCLIBC_MJN3_ONLY__
diff --git a/libc/misc/wctype/_wctype.c b/libc/misc/wctype/_wctype.c
index a7d111039..84c308a18 100644
--- a/libc/misc/wctype/_wctype.c
+++ b/libc/misc/wctype/_wctype.c
@@ -60,9 +60,6 @@ libc_hidden_proto(iswctype_l)
#else
libc_hidden_proto(__ctype_b)
#endif /* __UCLIBC_HAS_XLOCALE__ */
-#ifdef __UCLIBC_HAS_LOCALE__
-libc_hidden_proto(__global_locale)
-#endif
/* We know wide char support is enabled. We wouldn't be here otherwise. */
diff --git a/libc/misc/wordexp/wordexp.c b/libc/misc/wordexp/wordexp.c
index 1693d8b8a..8d2e6e05f 100644
--- a/libc/misc/wordexp/wordexp.c
+++ b/libc/misc/wordexp/wordexp.c
@@ -44,7 +44,6 @@ libc_hidden_proto(strlen)
libc_hidden_proto(strndup)
libc_hidden_proto(strspn)
libc_hidden_proto(strcspn)
-libc_hidden_proto(__environ)
libc_hidden_proto(setenv)
libc_hidden_proto(unsetenv)
libc_hidden_proto(waitpid)
@@ -66,7 +65,6 @@ libc_hidden_proto(getpid)
libc_hidden_proto(sprintf)
libc_hidden_proto(fprintf)
libc_hidden_proto(abort)
-libc_hidden_proto(stderr)
libc_hidden_proto(glob)
libc_hidden_proto(globfree)
libc_hidden_proto(wordfree)
diff --git a/libc/stdio/__fsetlocking.c b/libc/stdio/__fsetlocking.c
index 746a098f9..2e8710076 100644
--- a/libc/stdio/__fsetlocking.c
+++ b/libc/stdio/__fsetlocking.c
@@ -9,9 +9,6 @@
#include <stdio_ext.h>
libc_hidden_proto(__fsetlocking)
-#ifdef __UCLIBC_HAS_THREADS__
-libc_hidden_proto(_stdio_user_locking)
-#endif
/* Not threadsafe. */
diff --git a/libc/stdio/_fopen.c b/libc/stdio/_fopen.c
index 4ca028275..02051eff9 100644
--- a/libc/stdio/_fopen.c
+++ b/libc/stdio/_fopen.c
@@ -11,10 +11,6 @@ libc_hidden_proto(isatty)
libc_hidden_proto(open)
libc_hidden_proto(fcntl)
-#ifdef __UCLIBC_HAS_THREADS__
-libc_hidden_proto(_stdio_user_locking)
-#endif
-
/*
* Cases:
* fopen64 : filename != NULL, stream == NULL, filedes == -2
diff --git a/libc/stdio/_fpmaxtostr.c b/libc/stdio/_fpmaxtostr.c
index 9b87f64cf..f5632337d 100644
--- a/libc/stdio/_fpmaxtostr.c
+++ b/libc/stdio/_fpmaxtostr.c
@@ -12,9 +12,6 @@
#include <bits/uClibc_fpmax.h>
libc_hidden_proto(memset)
-#ifdef __UCLIBC_HAS_LOCALE__
-libc_hidden_proto(__global_locale)
-#endif
typedef size_t (__fp_outfunc_t)(FILE *fp, intptr_t type, intptr_t len,
intptr_t buf);
diff --git a/libc/stdio/_scanf.c b/libc/stdio/_scanf.c
index df78e7ad3..bbbcdcc17 100644
--- a/libc/stdio/_scanf.c
+++ b/libc/stdio/_scanf.c
@@ -101,9 +101,6 @@ libc_hidden_proto(fgetwc_unlocked)
#ifdef __UCLIBC_HAS_XLOCALE__
libc_hidden_proto(__ctype_b_loc)
#else
-#ifdef __UCLIBC_HAS_LOCALE__
-libc_hidden_proto(__global_locale)
-#endif
libc_hidden_proto(__ctype_b)
#endif
diff --git a/libc/stdio/_stdio.c b/libc/stdio/_stdio.c
index 63fc370dd..6c96d8660 100644
--- a/libc/stdio/_stdio.c
+++ b/libc/stdio/_stdio.c
@@ -125,19 +125,12 @@ static FILE _stdio_streams[] = {
0 )
};
-/* psm: moved to _stdio.h: libc_hidden_proto(stdin/stdout) */
FILE *stdin = _stdio_streams;
-libc_hidden_data_def(stdin)
FILE *stdout = _stdio_streams + 1;
-libc_hidden_data_def(stdout)
-libc_hidden_proto(stderr)
FILE *stderr = _stdio_streams + 2;
-libc_hidden_data_def(stderr)
#ifdef __STDIO_GETC_MACRO
-libc_hidden_proto(__stdin)
FILE *__stdin = _stdio_streams; /* For getchar() macro. */
-libc_hidden_data_def(__stdin)
#endif
#ifdef __STDIO_PUTC_MACRO
FILE *__stdout = _stdio_streams + 1; /* For putchar() macro. */
@@ -159,11 +152,9 @@ FILE *__stdout = _stdio_streams + 1; /* For putchar() macro. */
*/
FILE *_stdio_openlist = _stdio_streams;
-libc_hidden_data_def(_stdio_openlist)
# ifdef __UCLIBC_HAS_THREADS__
pthread_mutex_t _stdio_openlist_lock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
-libc_hidden_data_def(_stdio_openlist_lock)
int _stdio_openlist_delflag = 0;
# endif
@@ -172,9 +163,7 @@ int _stdio_openlist_delflag = 0;
#ifdef __UCLIBC_HAS_THREADS__
/* 2 if threading not initialized and 0 otherwise; */
-libc_hidden_proto(_stdio_user_locking)
int _stdio_user_locking = 2;
-libc_hidden_data_def(_stdio_user_locking)
void attribute_hidden __stdio_init_mutex(pthread_mutex_t *m)
{
diff --git a/libc/stdio/_stdio.h b/libc/stdio/_stdio.h
index 83d43352b..348f5ec5d 100644
--- a/libc/stdio/_stdio.h
+++ b/libc/stdio/_stdio.h
@@ -20,14 +20,8 @@
#include <wchar.h>
#endif
-libc_hidden_proto(stdin)
-libc_hidden_proto(stdout)
-
-libc_hidden_proto(_stdio_openlist)
-
#ifdef __UCLIBC_HAS_THREADS__
#include <pthread.h>
-libc_hidden_proto(_stdio_openlist_lock)
#define __STDIO_THREADLOCK_OPENLIST \
__pthread_mutex_lock(&_stdio_openlist_lock)
diff --git a/libc/stdio/_uintmaxtostr.c b/libc/stdio/_uintmaxtostr.c
index f9c83506e..4310d6458 100644
--- a/libc/stdio/_uintmaxtostr.c
+++ b/libc/stdio/_uintmaxtostr.c
@@ -12,9 +12,6 @@
#include <bits/uClibc_uintmaxtostr.h>
libc_hidden_proto(memcpy)
-#ifdef __UCLIBC_HAS_LOCALE__
-libc_hidden_proto(__global_locale)
-#endif
/* Avoid using long long / and % operations to cut down dependencies on
* libgcc.a. Definitely helps on i386 at least. */
diff --git a/libc/stdio/_vfprintf.c b/libc/stdio/_vfprintf.c
index a32960f2e..d6965ca83 100644
--- a/libc/stdio/_vfprintf.c
+++ b/libc/stdio/_vfprintf.c
@@ -512,10 +512,6 @@ size_t parse_printf_format(register const char *template,
/**********************************************************************/
#ifdef L__ppfs_init
-#ifdef __UCLIBC_HAS_LOCALE__
-libc_hidden_proto(__global_locale)
-#endif
-
int attribute_hidden _ppfs_init(register ppfs_t *ppfs, const char *fmt0)
{
int r;
@@ -1254,10 +1250,6 @@ static size_t _fp_out_narrow(FILE *fp, intptr_t type, intptr_t len, intptr_t buf
#define _outnwcs(stream, wstring, len) _wstdio_fwrite(wstring, len, stream)
#define FP_OUT _fp_out_wide
-#ifdef __UCLIBC_HAS_LOCALE__
-libc_hidden_proto(__global_locale)
-#endif
-
static size_t _outnstr(FILE *stream, const char *s, size_t wclen)
{
/* NOTE!!! len here is the number of wchars we want to generate!!! */
diff --git a/libc/stdio/fflush.c b/libc/stdio/fflush.c
index a2e1cf916..c0f58d8af 100644
--- a/libc/stdio/fflush.c
+++ b/libc/stdio/fflush.c
@@ -16,7 +16,6 @@ libc_hidden_proto(fflush_unlocked)
#endif /* __UCLIBC_MJN3_ONLY__ */
#ifdef __UCLIBC_HAS_THREADS__
-libc_hidden_proto(_stdio_user_locking)
/* Even if the stream is set to user-locking, we still need to lock
* when all (lbf) writing streams are flushed. */
#define MY_STDIO_THREADLOCK(STREAM) \
diff --git a/libc/stdio/gets.c b/libc/stdio/gets.c
index 5ff7869dc..dc541339b 100644
--- a/libc/stdio/gets.c
+++ b/libc/stdio/gets.c
@@ -13,9 +13,7 @@ link_warning(gets, "the 'gets' function is dangerous and should not be used.")
libc_hidden_proto(getchar_unlocked)
libc_hidden_proto(__fgetc_unlocked)
-#ifdef __STDIO_GETC_MACRO
-libc_hidden_proto(__stdin)
-#else
+#ifndef __STDIO_GETC_MACRO
#define __stdin stdin
#endif
diff --git a/libc/stdio/perror.c b/libc/stdio/perror.c
index 2c3cbbdb5..993fcf428 100644
--- a/libc/stdio/perror.c
+++ b/libc/stdio/perror.c
@@ -9,7 +9,6 @@
libc_hidden_proto(fprintf)
libc_hidden_proto(__glibc_strerror_r)
-libc_hidden_proto(stderr)
#ifdef __UCLIBC_MJN3_ONLY__
#warning CONSIDER: Increase buffer size for error message (non-%m case)?
diff --git a/libc/stdlib/_atexit.c b/libc/stdlib/_atexit.c
index bf35ab2d6..236156001 100644
--- a/libc/stdlib/_atexit.c
+++ b/libc/stdlib/_atexit.c
@@ -49,7 +49,6 @@ libc_hidden_proto(_exit)
#ifdef __UCLIBC_HAS_THREADS__
# include <pthread.h>
extern pthread_mutex_t mylock;
-libc_hidden_proto(mylock)
#endif
#define LOCK __pthread_mutex_lock(&mylock)
#define UNLOCK __pthread_mutex_unlock(&mylock)
@@ -315,7 +314,6 @@ extern void weak_function _stdio_term(void) attribute_hidden;
attribute_hidden void (*__exit_cleanup) (int) = 0;
#ifdef __UCLIBC_HAS_THREADS__
pthread_mutex_t mylock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
-libc_hidden_data_def(mylock)
#endif
extern void __uClibc_fini(void);
diff --git a/libc/stdlib/_strtod.c b/libc/stdlib/_strtod.c
index c4447d9ea..f2cd5e86b 100644
--- a/libc/stdlib/_strtod.c
+++ b/libc/stdlib/_strtod.c
@@ -178,9 +178,6 @@ extern void __fp_range_check(__fpmax_t y, __fpmax_t x) attribute_hidden;
#ifdef __UCLIBC_HAS_XLOCALE__
libc_hidden_proto(__ctype_b_loc)
#else
-#ifdef __UCLIBC_HAS_LOCALE__
-libc_hidden_proto(__global_locale)
-#endif
libc_hidden_proto(__ctype_b)
libc_hidden_proto(__ctype_tolower)
#endif
diff --git a/libc/stdlib/getenv.c b/libc/stdlib/getenv.c
index 4f4c4f1f8..c7940f398 100644
--- a/libc/stdlib/getenv.c
+++ b/libc/stdlib/getenv.c
@@ -11,7 +11,6 @@
libc_hidden_proto(getenv)
libc_hidden_proto(memcmp)
libc_hidden_proto(strlen)
-libc_hidden_proto(__environ)
/* IEEE Std 1003.1-2001 says getenv need not be thread safe, so
* don't bother locking access to __environ */
diff --git a/libc/stdlib/malloc-standard/mallinfo.c b/libc/stdlib/malloc-standard/mallinfo.c
index 89c9a6e7e..4f274ed32 100644
--- a/libc/stdlib/malloc-standard/mallinfo.c
+++ b/libc/stdlib/malloc-standard/mallinfo.c
@@ -17,7 +17,6 @@
#include "malloc.h"
libc_hidden_proto(fprintf)
-libc_hidden_proto(stderr)
/* ------------------------------ mallinfo ------------------------------ */
libc_hidden_proto(mallinfo)
diff --git a/libc/stdlib/malloc-standard/malloc.c b/libc/stdlib/malloc-standard/malloc.c
index 10d421330..b4b1216ed 100644
--- a/libc/stdlib/malloc-standard/malloc.c
+++ b/libc/stdlib/malloc-standard/malloc.c
@@ -19,7 +19,6 @@
#ifdef __UCLIBC_HAS_THREADS__
pthread_mutex_t __malloc_lock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
-libc_hidden_data_def(__malloc_lock)
#endif
/*
diff --git a/libc/stdlib/malloc-standard/malloc.h b/libc/stdlib/malloc-standard/malloc.h
index a3fabb0c4..453d69736 100644
--- a/libc/stdlib/malloc-standard/malloc.h
+++ b/libc/stdlib/malloc-standard/malloc.h
@@ -31,7 +31,6 @@ libc_hidden_proto(abort)
#ifdef __UCLIBC_HAS_THREADS__
# include <pthread.h>
extern pthread_mutex_t __malloc_lock;
-libc_hidden_proto(__malloc_lock)
#endif
#define LOCK __pthread_mutex_lock(&__malloc_lock)
#define UNLOCK __pthread_mutex_unlock(&__malloc_lock)
diff --git a/libc/stdlib/malloc/malloc.h b/libc/stdlib/malloc/malloc.h
index 753205443..e722bc86a 100644
--- a/libc/stdlib/malloc/malloc.h
+++ b/libc/stdlib/malloc/malloc.h
@@ -16,7 +16,6 @@
/* The system pagesize... */
extern size_t __pagesize;
-libc_hidden_proto(__pagesize)
#define MALLOC_PAGE_SIZE __pagesize
/* The minimum size of block we request from the the system to extend the
diff --git a/libc/stdlib/setenv.c b/libc/stdlib/setenv.c
index e7dc26053..fa61675fb 100644
--- a/libc/stdlib/setenv.c
+++ b/libc/stdlib/setenv.c
@@ -31,7 +31,6 @@ libc_hidden_proto(strlen)
libc_hidden_proto(strncmp)
libc_hidden_proto(strndup)
libc_hidden_proto(unsetenv)
-libc_hidden_proto(__environ)
#ifdef __UCLIBC_HAS_THREADS__
# include <pthread.h>
diff --git a/libc/stdlib/stdlib.c b/libc/stdlib/stdlib.c
index f9ec75555..61a6da01c 100644
--- a/libc/stdlib/stdlib.c
+++ b/libc/stdlib/stdlib.c
@@ -102,9 +102,6 @@
#ifdef __UCLIBC_HAS_XLOCALE__
#include <xlocale.h>
#endif /* __UCLIBC_HAS_XLOCALE__ */
-#ifdef __UCLIBC_HAS_LOCALE__
-libc_hidden_proto(__global_locale)
-#endif
/* TODO: clean up the following... */
diff --git a/libc/string/_collate.c b/libc/string/_collate.c
index 42216e9e4..3009e4ebf 100644
--- a/libc/string/_collate.c
+++ b/libc/string/_collate.c
@@ -57,8 +57,6 @@ libc_hidden_proto(wcscmp)
#endif /* defined(L_strxfrm) || defined(L_strxfrm_l) */
-libc_hidden_proto(__global_locale)
-
#if defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE)
libc_hidden_proto(wcscoll_l)
diff --git a/libc/string/psignal.c b/libc/string/psignal.c
index a852e6047..467e3bc37 100644
--- a/libc/string/psignal.c
+++ b/libc/string/psignal.c
@@ -12,7 +12,6 @@
libc_hidden_proto(fprintf)
libc_hidden_proto(strsignal)
-libc_hidden_proto(stderr)
/* TODO: make this threadsafe with a reentrant version of strsignal? */
diff --git a/libc/sysdeps/linux/alpha/brk.S b/libc/sysdeps/linux/alpha/brk.S
index a108c0d36..05c3b2c43 100644
--- a/libc/sysdeps/linux/alpha/brk.S
+++ b/libc/sysdeps/linux/alpha/brk.S
@@ -68,7 +68,7 @@ brk:
/* Update __curbrk and return cleanly. */
mov $31, $0
-$ok: stq $16, HIDDEN_JUMPTARGET(__curbrk)
+$ok: stq $16, __curbrk
addq $30, 8, $30
ret
diff --git a/libc/sysdeps/linux/arm/brk.c b/libc/sysdeps/linux/arm/brk.c
index 185d9b4dc..3d606e533 100644
--- a/libc/sysdeps/linux/arm/brk.c
+++ b/libc/sysdeps/linux/arm/brk.c
@@ -24,10 +24,7 @@
libc_hidden_proto(brk)
/* This must be initialized data because commons can't have aliases. */
-extern void *__curbrk;
-libc_hidden_proto(__curbrk)
void *__curbrk = 0;
-libc_hidden_data_def(__curbrk)
int brk (void *addr)
{
diff --git a/libc/sysdeps/linux/bfin/brk.c b/libc/sysdeps/linux/bfin/brk.c
index 1df3ae517..3b261697b 100644
--- a/libc/sysdeps/linux/bfin/brk.c
+++ b/libc/sysdeps/linux/bfin/brk.c
@@ -11,10 +11,7 @@
libc_hidden_proto(brk)
/* This must be initialized data because commons can't have aliases. */
-extern void * __curbrk;
-libc_hidden_proto(__curbrk)
void * __curbrk = 0;
-libc_hidden_data_def(__curbrk)
int brk (void *addr)
{
diff --git a/libc/sysdeps/linux/common/getpagesize.c b/libc/sysdeps/linux/common/getpagesize.c
index 4a35d0775..efb5fcb7f 100644
--- a/libc/sysdeps/linux/common/getpagesize.c
+++ b/libc/sysdeps/linux/common/getpagesize.c
@@ -21,7 +21,6 @@
#include <sys/param.h>
extern size_t __pagesize;
-libc_hidden_proto(__pagesize)
/* Return the system page size. */
/* couldn't make __getpagesize hidden, because shm.h uses it in a macro */
diff --git a/libc/sysdeps/linux/common/sbrk.c b/libc/sysdeps/linux/common/sbrk.c
index d9a4d6899..f8b568262 100644
--- a/libc/sysdeps/linux/common/sbrk.c
+++ b/libc/sysdeps/linux/common/sbrk.c
@@ -13,7 +13,6 @@ libc_hidden_proto(brk)
/* Defined in brk.c. */
extern void *__curbrk;
-libc_hidden_proto(__curbrk)
/* Extend the process's data space by INCREMENT.
If INCREMENT is negative, shrink data space by - INCREMENT.
diff --git a/libc/sysdeps/linux/cris/__init_brk.c b/libc/sysdeps/linux/cris/__init_brk.c
index 8e6591a62..df41f9b4c 100644
--- a/libc/sysdeps/linux/cris/__init_brk.c
+++ b/libc/sysdeps/linux/cris/__init_brk.c
@@ -5,10 +5,7 @@
#include <errno.h>
#include "sysdep.h"
-extern void *__curbrk;
-libc_hidden_proto(__curbrk)
void * __curbrk = 0;
-libc_hidden_data_def(__curbrk)
extern int __init_brk (void);
libc_hidden_proto(__init_brk)
diff --git a/libc/sysdeps/linux/cris/brk.c b/libc/sysdeps/linux/cris/brk.c
index 6c518f5a6..8183aabf3 100644
--- a/libc/sysdeps/linux/cris/brk.c
+++ b/libc/sysdeps/linux/cris/brk.c
@@ -12,7 +12,6 @@
libc_hidden_proto(brk)
extern void * __curbrk;
-libc_hidden_proto(__curbrk)
extern int __init_brk (void);
libc_hidden_proto(__init_brk)
diff --git a/libc/sysdeps/linux/cris/sbrk.c b/libc/sysdeps/linux/cris/sbrk.c
index 15f506cd7..934dc90c4 100644
--- a/libc/sysdeps/linux/cris/sbrk.c
+++ b/libc/sysdeps/linux/cris/sbrk.c
@@ -13,7 +13,6 @@
libc_hidden_proto(sbrk)
extern void * __curbrk;
-libc_hidden_proto(__curbrk)
extern int __init_brk (void);
libc_hidden_proto(__init_brk)
diff --git a/libc/sysdeps/linux/frv/__init_brk.c b/libc/sysdeps/linux/frv/__init_brk.c
index 507902fc5..b688f98af 100644
--- a/libc/sysdeps/linux/frv/__init_brk.c
+++ b/libc/sysdeps/linux/frv/__init_brk.c
@@ -4,10 +4,7 @@
#include <unistd.h>
#include <sys/syscall.h>
-extern void * __curbrk;
-libc_hidden_proto(__curbrk)
void * __curbrk = 0;
-libc_hidden_data_def(__curbrk)
#define __NR__brk __NR_brk
attribute_hidden _syscall1(void *, _brk, void *, ptr);
diff --git a/libc/sysdeps/linux/frv/brk.c b/libc/sysdeps/linux/frv/brk.c
index 9e33830ab..b26f74fec 100644
--- a/libc/sysdeps/linux/frv/brk.c
+++ b/libc/sysdeps/linux/frv/brk.c
@@ -12,7 +12,6 @@
libc_hidden_proto(brk)
extern void * __curbrk;
-libc_hidden_proto(__curbrk)
extern int __init_brk (void);
libc_hidden_proto(__init_brk)
diff --git a/libc/sysdeps/linux/frv/sbrk.c b/libc/sysdeps/linux/frv/sbrk.c
index bb66f0148..fd760985e 100644
--- a/libc/sysdeps/linux/frv/sbrk.c
+++ b/libc/sysdeps/linux/frv/sbrk.c
@@ -7,7 +7,6 @@
libc_hidden_proto(sbrk)
extern void * __curbrk;
-libc_hidden_proto(__curbrk)
extern int __init_brk (void);
libc_hidden_proto(__init_brk)
diff --git a/libc/sysdeps/linux/h8300/brk.c b/libc/sysdeps/linux/h8300/brk.c
index 52ba1ac9c..0da4286e7 100644
--- a/libc/sysdeps/linux/h8300/brk.c
+++ b/libc/sysdeps/linux/h8300/brk.c
@@ -12,10 +12,7 @@
libc_hidden_proto(brk)
/* This must be initialized data because commons can't have aliases. */
-extern void *__curbrk;
-libc_hidden_proto(__curbrk)
void *__curbrk = 0;
-libc_hidden_data_def(__curbrk)
int brk (void *addr)
{
diff --git a/libc/sysdeps/linux/hppa/brk.c b/libc/sysdeps/linux/hppa/brk.c
index 52d0b4c74..b57c3328a 100644
--- a/libc/sysdeps/linux/hppa/brk.c
+++ b/libc/sysdeps/linux/hppa/brk.c
@@ -24,10 +24,7 @@
libc_hidden_proto(brk)
/* This must be initialized data because commons can't have aliases. */
-extern void *__curbrk;
-libc_hidden_proto(__curbrk)
void *__curbrk = 0;
-libc_hidden_data_def(__curbrk)
int
brk (void *addr)
diff --git a/libc/sysdeps/linux/i386/brk.c b/libc/sysdeps/linux/i386/brk.c
index 6a654f0d0..fcf7f3b33 100644
--- a/libc/sysdeps/linux/i386/brk.c
+++ b/libc/sysdeps/linux/i386/brk.c
@@ -24,10 +24,7 @@
libc_hidden_proto(brk)
/* This must be initialized data because commons can't have aliases. */
-extern void *__curbrk;
-libc_hidden_proto(__curbrk)
void *__curbrk = 0;
-libc_hidden_data_def(__curbrk)
int brk (void *addr)
{
diff --git a/libc/sysdeps/linux/ia64/brk.S b/libc/sysdeps/linux/ia64/brk.S
index 35547b74b..82a962d46 100644
--- a/libc/sysdeps/linux/ia64/brk.S
+++ b/libc/sysdeps/linux/ia64/brk.S
@@ -31,7 +31,6 @@
.align 8
__curbrk:
data8 0
-libc_hidden_data_def(__curbrk)
weak_alias (__curbrk, ___brk_addr)
@@ -39,7 +38,7 @@ LEAF(brk)
.regstk 1, 0, 0, 0
DO_CALL(__NR_brk)
cmp.ltu p6, p0 = ret0, in0
- addl r9 = @ltoff(HIDDEN_JUMPTARGET(__curbrk)), gp
+ addl r9 = @ltoff(__curbrk), gp
;;
ld8 r9 = [r9]
(p6) mov ret0 = ENOMEM
diff --git a/libc/sysdeps/linux/m68k/brk.c b/libc/sysdeps/linux/m68k/brk.c
index b627f6400..cad5976de 100644
--- a/libc/sysdeps/linux/m68k/brk.c
+++ b/libc/sysdeps/linux/m68k/brk.c
@@ -12,10 +12,7 @@
libc_hidden_proto(brk)
/* This must be initialized data because commons can't have aliases. */
-extern void *__curbrk;
-libc_hidden_proto(__curbrk)
void * __curbrk = 0;
-libc_hidden_data_def(__curbrk)
int brk (void *addr)
{
diff --git a/libc/sysdeps/linux/mips/brk.c b/libc/sysdeps/linux/mips/brk.c
index 8d2b4ede1..cf48288f4 100644
--- a/libc/sysdeps/linux/mips/brk.c
+++ b/libc/sysdeps/linux/mips/brk.c
@@ -23,10 +23,7 @@
libc_hidden_proto(brk)
-extern void *__curbrk;
-libc_hidden_proto(__curbrk)
void *__curbrk = 0;
-libc_hidden_data_def(__curbrk)
int brk (void *addr)
{
diff --git a/libc/sysdeps/linux/nios/brk.c b/libc/sysdeps/linux/nios/brk.c
index 69f60d336..2c252f90c 100644
--- a/libc/sysdeps/linux/nios/brk.c
+++ b/libc/sysdeps/linux/nios/brk.c
@@ -24,10 +24,7 @@
libc_hidden_proto(brk)
/* This must be initialized data because commons can't have aliases. */
-extern void *__curbrk;
-libc_hidden_proto(__curbrk)
void *__curbrk = 0;
-libc_hidden_data_def(__curbrk)
int brk (void *addr)
{
diff --git a/libc/sysdeps/linux/nios2/brk.c b/libc/sysdeps/linux/nios2/brk.c
index 2d7bf4420..1711e609c 100644
--- a/libc/sysdeps/linux/nios2/brk.c
+++ b/libc/sysdeps/linux/nios2/brk.c
@@ -24,11 +24,7 @@
libc_hidden_proto(brk)
/* This must be initialized data because commons can't have aliases. */
-extern void *__curbrk;
-libc_hidden_proto(__curbrk)
void *__curbrk = 0;
-libc_hidden_data_def(__curbrk)
-
int brk (void *addr)
{
diff --git a/libc/sysdeps/linux/powerpc/brk.S b/libc/sysdeps/linux/powerpc/brk.S
index 95b4dfd0d..b06dc0c94 100644
--- a/libc/sysdeps/linux/powerpc/brk.S
+++ b/libc/sysdeps/linux/powerpc/brk.S
@@ -35,7 +35,6 @@ __curbrk: .skip 4
#else
.comm __curbrk, 4,4
#endif
-libc_hidden_data_def(__curbrk)
.text
.globl brk
@@ -52,12 +51,12 @@ brk:
mflr r4
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r5
- lwz r5,HIDDEN_JUMPTARGET(__curbrk)@got(r5)
+ lwz r5,__curbrk@got(r5)
mtlr r4
stw r3,0(r5)
#else
- lis r4,HIDDEN_JUMPTARGET(__curbrk)@ha
- stw r3,HIDDEN_JUMPTARGET(__curbrk)@l(r4)
+ lis r4,__curbrk@ha
+ stw r3,__curbrk@l(r4)
#endif
cmplw r6,r3
addi r1,r1,16
diff --git a/libc/sysdeps/linux/sh/__init_brk.c b/libc/sysdeps/linux/sh/__init_brk.c
index c14180a6c..9f5ee867b 100644
--- a/libc/sysdeps/linux/sh/__init_brk.c
+++ b/libc/sysdeps/linux/sh/__init_brk.c
@@ -4,10 +4,7 @@
#include <unistd.h>
#include <sys/syscall.h>
-extern void * __curbrk;
-libc_hidden_proto(__curbrk)
void * __curbrk = 0;
-libc_hidden_data_def(__curbrk)
#define __NR__brk __NR_brk
attribute_hidden _syscall1(void *, _brk, void *, ptr);
diff --git a/libc/sysdeps/linux/sh/brk.c b/libc/sysdeps/linux/sh/brk.c
index 9e33830ab..b26f74fec 100644
--- a/libc/sysdeps/linux/sh/brk.c
+++ b/libc/sysdeps/linux/sh/brk.c
@@ -12,7 +12,6 @@
libc_hidden_proto(brk)
extern void * __curbrk;
-libc_hidden_proto(__curbrk)
extern int __init_brk (void);
libc_hidden_proto(__init_brk)
diff --git a/libc/sysdeps/linux/sh/sbrk.c b/libc/sysdeps/linux/sh/sbrk.c
index bb66f0148..fd760985e 100644
--- a/libc/sysdeps/linux/sh/sbrk.c
+++ b/libc/sysdeps/linux/sh/sbrk.c
@@ -7,7 +7,6 @@
libc_hidden_proto(sbrk)
extern void * __curbrk;
-libc_hidden_proto(__curbrk)
extern int __init_brk (void);
libc_hidden_proto(__init_brk)
diff --git a/libc/sysdeps/linux/sh64/__init_brk.c b/libc/sysdeps/linux/sh64/__init_brk.c
index c14180a6c..9f5ee867b 100644
--- a/libc/sysdeps/linux/sh64/__init_brk.c
+++ b/libc/sysdeps/linux/sh64/__init_brk.c
@@ -4,10 +4,7 @@
#include <unistd.h>
#include <sys/syscall.h>
-extern void * __curbrk;
-libc_hidden_proto(__curbrk)
void * __curbrk = 0;
-libc_hidden_data_def(__curbrk)
#define __NR__brk __NR_brk
attribute_hidden _syscall1(void *, _brk, void *, ptr);
diff --git a/libc/sysdeps/linux/sh64/brk.c b/libc/sysdeps/linux/sh64/brk.c
index 9e33830ab..b26f74fec 100644
--- a/libc/sysdeps/linux/sh64/brk.c
+++ b/libc/sysdeps/linux/sh64/brk.c
@@ -12,7 +12,6 @@
libc_hidden_proto(brk)
extern void * __curbrk;
-libc_hidden_proto(__curbrk)
extern int __init_brk (void);
libc_hidden_proto(__init_brk)
diff --git a/libc/sysdeps/linux/sh64/sbrk.c b/libc/sysdeps/linux/sh64/sbrk.c
index bb66f0148..fd760985e 100644
--- a/libc/sysdeps/linux/sh64/sbrk.c
+++ b/libc/sysdeps/linux/sh64/sbrk.c
@@ -7,7 +7,6 @@
libc_hidden_proto(sbrk)
extern void * __curbrk;
-libc_hidden_proto(__curbrk)
extern int __init_brk (void);
libc_hidden_proto(__init_brk)
diff --git a/libc/sysdeps/linux/sparc/brk.c b/libc/sysdeps/linux/sparc/brk.c
index a855ef013..f6d5281d2 100644
--- a/libc/sysdeps/linux/sparc/brk.c
+++ b/libc/sysdeps/linux/sparc/brk.c
@@ -24,10 +24,7 @@
libc_hidden_proto(brk)
/* This must be initialized data because commons can't have aliases. */
-extern void *__curbrk;
-libc_hidden_proto(__curbrk)
void *__curbrk = 0;
-libc_hidden_data_def(__curbrk)
int brk (void *addr)
{
diff --git a/libc/sysdeps/linux/vax/brk.c b/libc/sysdeps/linux/vax/brk.c
index c8105b639..5b23f6075 100644
--- a/libc/sysdeps/linux/vax/brk.c
+++ b/libc/sysdeps/linux/vax/brk.c
@@ -22,10 +22,7 @@
#include <sys/syscall.h>
/* This must be initialized data because commons can't have aliases. */
-extern void *__curbrk;
-libc_hidden_proto(__curbrk)
void *__curbrk = NULL;
-libc_hidden_data_def(__curbrk)
libc_hidden_proto(brk)
int
diff --git a/libc/sysdeps/linux/x86_64/brk.c b/libc/sysdeps/linux/x86_64/brk.c
index e0f9637c4..09d911066 100644
--- a/libc/sysdeps/linux/x86_64/brk.c
+++ b/libc/sysdeps/linux/x86_64/brk.c
@@ -24,10 +24,7 @@
libc_hidden_proto(brk)
/* This must be initialized data because commons can't have aliases. */
-extern void *__curbrk;
-libc_hidden_proto(__curbrk)
void *__curbrk = 0;
-libc_hidden_data_def(__curbrk)
int brk (void *addr)
{
diff --git a/libc/unistd/exec.c b/libc/unistd/exec.c
index 3563723ad..eaf6a40aa 100644
--- a/libc/unistd/exec.c
+++ b/libc/unistd/exec.c
@@ -50,7 +50,6 @@ libc_hidden_proto(execve)
libc_hidden_proto(mmap)
libc_hidden_proto(munmap)
libc_hidden_proto(getenv)
-libc_hidden_proto(__environ)
/**********************************************************************/
#if defined(__ARCH_USE_MMU__) || defined(__UCLIBC_UCLINUX_BROKEN_MUNMAP__)
diff --git a/libc/unistd/getopt.c b/libc/unistd/getopt.c
index cffde47e1..0c30032c9 100644
--- a/libc/unistd/getopt.c
+++ b/libc/unistd/getopt.c
@@ -127,7 +127,6 @@ libc_hidden_proto(strlen)
libc_hidden_proto(strncmp)
libc_hidden_proto(getenv)
libc_hidden_proto(fprintf)
-libc_hidden_proto(stderr)
/* For communication from `getopt' to the caller.
When `getopt' finds an option that takes an argument,
diff --git a/libc/unistd/getpass.c b/libc/unistd/getpass.c
index 455838c62..5833bc317 100644
--- a/libc/unistd/getpass.c
+++ b/libc/unistd/getpass.c
@@ -35,8 +35,6 @@ libc_hidden_proto(fputs)
libc_hidden_proto(fputc)
libc_hidden_proto(putc)
libc_hidden_proto(__fputc_unlocked)
-libc_hidden_proto(stdin)
-libc_hidden_proto(stderr)
/* It is desirable to use this bit on systems that have it.
The only bit of terminal state we want to twiddle is echoing, which is
diff --git a/libm/k_standard.c b/libm/k_standard.c
index 11df7bb5c..30d83e3ca 100644
--- a/libm/k_standard.c
+++ b/libm/k_standard.c
@@ -21,7 +21,6 @@ static char rcsid[] = "$NetBSD: k_standard.c,v 1.6 1995/05/10 20:46:35 jtc Exp $
libm_hidden_proto(copysign)
libm_hidden_proto(matherr)
libm_hidden_proto(rint)
-libm_hidden_proto(_LIB_VERSION)
#ifndef _USE_WRITE
#include <stdio.h> /* fputs(), stderr */
diff --git a/libm/s_lib_version.c b/libm/s_lib_version.c
index 4028dfd6f..fde8e3bf6 100644
--- a/libm/s_lib_version.c
+++ b/libm/s_lib_version.c
@@ -24,7 +24,6 @@ static char rcsid[] = "$NetBSD: s_lib_version.c,v 1.6 1995/05/10 20:47:44 jtc Ex
/*
* define and initialize _LIB_VERSION
*/
-libm_hidden_proto(_LIB_VERSION)
#ifdef _POSIX_MODE
_LIB_VERSION_TYPE _LIB_VERSION = _POSIX_;
#else
@@ -38,4 +37,3 @@ _LIB_VERSION_TYPE _LIB_VERSION = _IEEE_;
#endif
#endif
#endif
-libm_hidden_data_def(_LIB_VERSION)