summaryrefslogtreecommitdiff
path: root/libc/misc/internals/__uClibc_main.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-09-15 09:12:59 +0000
committerMike Frysinger <vapier@gentoo.org>2007-09-15 09:12:59 +0000
commit46447589470fd53abd88402bd1f562c0370aa361 (patch)
treee9083e38b566d9cdd97cd9da9a7f6ca0056dad72 /libc/misc/internals/__uClibc_main.c
parentc1d804bf48b2284c3d0c504505dde63641bb70cc (diff)
bug 1310: drop hidden aliases to data since some arches crap with this due to copy relocs
Diffstat (limited to 'libc/misc/internals/__uClibc_main.c')
-rw-r--r--libc/misc/internals/__uClibc_main.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c
index 91c8a3984..c9c16e192 100644
--- a/libc/misc/internals/__uClibc_main.c
+++ b/libc/misc/internals/__uClibc_main.c
@@ -104,14 +104,14 @@ extern void (*__fini_array_end []) (void) attribute_hidden;
# 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
/*
@@ -337,15 +337,14 @@ void __uClibc_main(int (*main)(int, char **, char **), int argc,
}
#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__