Attempting to backtrace in a simple helloworld app.  For the simple app,
we are just using the source of the example from man backtrace.  We SEEM
to be running into an infinite loop around line 296 of file
dlso/dlso/dl-hash.c in which there is a loop that (again) SEEMS to walk
off into oblivion.  BTW, this is the 0.9.33.2 packaged version, if it is
fixed later, I don't know it.

What we are attempting to do is source level debug (from gdbserver
running on a p1014 target) uClibc.  I'm using CrossTool-NG to build the
toolchain.  I've hacked up CTNG to REMOVE the sed scripts that remove
the debug information settings in my .config file.  Setting the
following flags:

DODEBUG=y
# DOASSERTS is not set
SUPPORT_LD_DEBUG=y

ends in a build failure in which it appears that one of the .a libs is
attempting to link against libgcc_s.so.1 (which contains
_Unwind_Backtrace and (I think) _Unwind_Resume.  This won't work so good
since these are not available static.  Here is the error I get:

/usr/bin/make -C extra/locale locale_headers
make[3]: Nothing to be done for `locale_headers'.
true -x -R .note -R .comment libc/libc_so.a
rm -f lib/libc.so lib/libc.so.0 lib/libuClibc-0.9.33.2.so
powerpc-unknown-linux-uclibcgnuspe-gcc -Wl,-EB -shared -Wl,--warn-common
 -Wl,--warn-once -Wl,-z,combreloc -Wl,-z,relro -Wl,-z,now -Wl,-z,defs   
-Wl,-init,__uClibc_init  -Wl,-soname=libc.so.0 -nostdlib -o lib/libuClib
c-0.9.33.2.so  -Wl,--whole-archive libc/libc_so.a -Wl,--no-whole-archive
 ./lib/interp.os ./lib/ld-uClibc.so.0 ./lib/uclibc_nonshared.a /crap/cro
sstool-ng-1.18.0/.build/powerpc-unknown-linux-uclibcgnuspe/buildtools/li
b/gcc/powerpc-unknown-linux-uclibcgnuspe/4.7.2/libgcc.a 
libc/libc_so.a(lockf.os): In function `__GI_lockf':
/crap/crosstool-ng-1.18.0/.build/powerpc-unknown-linux-uclibcgnuspe/buil
d/build-libc/libc/misc/file/lockf.c:73: undefined reference to `_Unwind_
Resume'
libc/libc_so.a(lockf.os):(.sdata.DW.ref.__gcc_personality_v0[DW.ref.__gc
c_personality_v0]+0x0): undefined reference to `__gcc_personality_v0'
collect2: error: ld returned 1 exit status
make[1]: *** [lib/libc.so] Error 1

Is there an easy way to enable source level debugging so that we can
work out the issues that dl_* are having with opening up the
libgcc_s.so.1 file at run-time?

Thanks in advance for any assistance you can give.

Andy
_______________________________________________
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to