summaryrefslogtreecommitdiff
path: root/libc/misc
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 /libc/misc
parent7747ec45650949ca4712be8e2cbc0588c0922982 (diff)
Remove all non-constant libc_hidden_data_def(), it is too unreliable, sorry, most of global data relocations are back
Diffstat (limited to 'libc/misc')
-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
10 files changed, 3 insertions, 45 deletions
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)