__libc_stack_end missing + patch

Ronald Wahl rwa at peppercon.com
Wed Sep 7 02:08:56 PDT 2005


Hello,

just updated my system from 0.9.21 to 0.9.28 and got an error regarding
a missing reference to __libc_stack_end. This symbol is referenced by
libc.so itself and is contained in the libc.a and ldso. But it seems
that the "ld" Linker cannot resolve it. I read somewhere that it mmight
be in libgcc.a but not on my own selfmade toolchain. So i added a weak
symbol for it. Patch below. I hope it will not break something.

- ron

Index: libc/misc/internals/__uClibc_main.c
===================================================================
RCS file: /srv/CVS/pplinux/uClibc/libc/misc/internals/__uClibc_main.c,v
retrieving revision 1.1.309.2
retrieving revision 1.2
diff -u -r1.1.309.2 -r1.2
--- libc/misc/internals/__uClibc_main.c 6 Sep 2005 07:24:17 -0000       1.1.309.2
+++ libc/misc/internals/__uClibc_main.c 7 Sep 2005 07:29:54 -0000       1.2
@@ -28,6 +28,8 @@
 extern void __guard_setup(void);
 #endif
 
+void * __dummy_libc_stack_end = NULL;
+weak_alias(__dummy_libc_stack_end, __libc_stack_end);
 
 /*
  * Prototypes.



More information about the uClibc mailing list