svn commit: branches/uClibc_0_9_29: extra/Configs libc/misc/internals

vapier at uclibc.org vapier at uclibc.org
Sat Jan 5 17:37:36 UTC 2008


Author: vapier
Date: 2008-01-05 09:37:36 -0800 (Sat, 05 Jan 2008)
New Revision: 20769

Log:
Merge r19845 by vapier from trunk:
bug 1310: drop hidden aliases to data since some arches crap with this due to copy relocs


Modified:
   branches/uClibc_0_9_29/extra/Configs/Config.in
   branches/uClibc_0_9_29/libc/misc/internals/__uClibc_main.c


Changeset:
Modified: branches/uClibc_0_9_29/extra/Configs/Config.in
===================================================================
--- branches/uClibc_0_9_29/extra/Configs/Config.in	2008-01-05 17:37:22 UTC (rev 20768)
+++ branches/uClibc_0_9_29/extra/Configs/Config.in	2008-01-05 17:37:36 UTC (rev 20769)
@@ -498,6 +498,7 @@
 config UCLIBC_HAS___PROGNAME
 	bool "Support for __progname"
 	default y
+	depends on UCLIBC_HAS_PROGRAM_INVOCATION_NAME
 	help
 	  Some packages (like openssh) like to peek into internal libc
 	  symbols to make their output a bit more user friendly.

Modified: branches/uClibc_0_9_29/libc/misc/internals/__uClibc_main.c
===================================================================
--- branches/uClibc_0_9_29/libc/misc/internals/__uClibc_main.c	2008-01-05 17:37:22 UTC (rev 20768)
+++ branches/uClibc_0_9_29/libc/misc/internals/__uClibc_main.c	2008-01-05 17:37:36 UTC (rev 20769)
@@ -104,15 +104,15 @@
 # endif
 #endif
 
-attribute_hidden const char *__uclibc_progname = NULL;
-#ifdef __UCLIBC_HAS___PROGNAME__
-strong_alias (__uclibc_progname, __progname)
-#endif
+attribute_hidden const char *__uclibc_progname = "";
 #ifdef __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__
-attribute_hidden const char *__progname_full = NULL;
-strong_alias (__uclibc_progname, program_invocation_short_name)
-strong_alias (__progname_full, program_invocation_name)
+const char *program_invocation_short_name = "";
+const char *program_invocation_name = "";
 #endif
+#ifdef __UCLIBC_HAS___PROGNAME__
+weak_alias (program_invocation_short_name, __progname)
+weak_alias (program_invocation_name, __progname_full)
+#endif
 
 /*
  * Declare the __environ global variable and create a strong alias environ.
@@ -337,15 +337,14 @@
     }
 #endif
 
+    __uclibc_progname = *argv;
 #ifdef __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__
-    __progname_full = *argv;
-    __progname = strrchr(*argv, '/');
-    if (__progname != NULL)
-	++__progname;
+    program_invocation_name = *argv;
+    program_invocation_short_name = strrchr(*argv, '/');
+    if (program_invocation_short_name != NULL)
+	++program_invocation_short_name;
     else
-	__progname = __progname_full;
-#else
-    __uclibc_progname = *argv;
+	program_invocation_short_name = program_invocation_name;
 #endif
 
 #ifdef __UCLIBC_CTOR_DTOR__




More information about the uClibc-cvs mailing list