summaryrefslogtreecommitdiff
path: root/libc/misc/internals/__uClibc_main.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-10-29 10:18:42 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-10-29 10:18:42 +0000
commit30c664f0a795bace5c99bedc936228780dba3256 (patch)
tree349e390798e5cab308a409a26484630e516f83af /libc/misc/internals/__uClibc_main.c
parente6aa37afc9c281a04f40250b8fcd35302064a087 (diff)
Hopefully correct undefined __libc_stack_end issue
Diffstat (limited to 'libc/misc/internals/__uClibc_main.c')
-rw-r--r--libc/misc/internals/__uClibc_main.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c
index e7c2c4abf..42f971f99 100644
--- a/libc/misc/internals/__uClibc_main.c
+++ b/libc/misc/internals/__uClibc_main.c
@@ -25,8 +25,12 @@
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/sysmacros.h>
+
#ifndef SHARED
+void *__libc_stack_end=NULL;
+
/* probably all the weak_*function stuff below should be in here */
+
#ifdef __UCLIBC_HAS_SSP__
#include <dl-osinfo.h>
#ifndef THREAD_SET_STACK_GUARD
@@ -39,12 +43,12 @@ uintptr_t __stack_chk_guard attribute_relro;
strong_alias(__stack_chk_guard,__guard)
#endif
#endif
-#endif
+
+#endif /* !SHARED */
/*
* Prototypes.
*/
-extern void *__libc_stack_end;
extern void weak_function _stdio_init(void);
extern int *weak_const_function __errno_location(void);
extern int *weak_const_function __h_errno_location(void);
@@ -191,7 +195,10 @@ __uClibc_main(int (*main)(int, char **, char **), int argc,
unsigned long *aux_dat;
ElfW(auxv_t) auxvt[AT_EGID + 1];
#endif
+
+#ifndef SHARED
__libc_stack_end = stack_end;
+#endif
__rtld_fini = rtld_fini;