From 30c664f0a795bace5c99bedc936228780dba3256 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 29 Oct 2005 10:18:42 +0000 Subject: Hopefully correct undefined __libc_stack_end issue --- libc/misc/internals/Makefile.in | 2 +- libc/misc/internals/__uClibc_main.c | 11 +++++++++-- libc/misc/internals/static.c | 4 ---- 3 files changed, 10 insertions(+), 7 deletions(-) delete mode 100644 libc/misc/internals/static.c (limited to 'libc/misc') diff --git a/libc/misc/internals/Makefile.in b/libc/misc/internals/Makefile.in index a9dc2634f..c6be32a30 100644 --- a/libc/misc/internals/Makefile.in +++ b/libc/misc/internals/Makefile.in @@ -16,7 +16,7 @@ MISC_INTERNALS_OUT:=$(top_builddir)libc/misc/internals MISC_INTERNALS_SRC:=$(patsubst %.c,$(MISC_INTERNALS_DIR)/%.c,$(CSRC)) MISC_INTERNALS_OBJ:=$(patsubst %.c,$(MISC_INTERNALS_OUT)/%.o,$(CSRC)) -STATIC_SRC:=__uClibc_main.c static.c +STATIC_SRC:=__uClibc_main.c $(MISC_INTERNALS_OUT)/interp.c: $(MISC_INTERNALS_DIR)/Makefile.in echo "/* Force shared libraries to know about the correct library loader */" > $@ 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 #include #include + #ifndef SHARED +void *__libc_stack_end=NULL; + /* probably all the weak_*function stuff below should be in here */ + #ifdef __UCLIBC_HAS_SSP__ #include #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; diff --git a/libc/misc/internals/static.c b/libc/misc/internals/static.c deleted file mode 100644 index cd39ffdd7..000000000 --- a/libc/misc/internals/static.c +++ /dev/null @@ -1,4 +0,0 @@ -#include - -/* Force static libraries to know about ... */ -void *__libc_stack_end=NULL; -- cgit v1.2.3