yo i modified ltrace to include support for libunwind. not sure exactly what you are trying to do, but if you want to get a backtrace from arbitrary library functions (glibc included) you might try just build ltrace from source (http://ltrace.alioth.debian.org/) and using that instead.
joe On Sat, Sep 24, 2011 at 2:46 PM, Fabio <[email protected]> wrote: > Hi all, > I am trying to build glibc and link libunwind to get a backtrace at > the beginning of some glibc function like strcpy for example but I > can't get them to build. > I include -lunwind in the CFLAGS and I export > LD_LIBRARY_PATH=/usr/local/lib, but when it comes to build ld.so it > fails: > > usr/bin/gcc-4.3 -nostdlib -nostartfiles -shared -I/usr/local/lib \ > -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Wl,-z,defs > -Wl,--verbose 2>&1 | \ > LC_ALL=C \ > sed -e '/^=========/,/^=========/!d;/^=========/d' \ > -e 's/\. = .* + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' > \ > > /home/wintermute/tesi/glibc/2.14/custom/glibc-build/elf/ld.so.lds > /usr/bin/gcc-4.3 -nostdlib -nostartfiles -shared -I/usr/local/lib -o > /home/wintermute/tesi/glibc/2.14/custom/glibc-build/elf/ld.so > \ > -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Wl,-z,defs > \ > /home/wintermute/tesi/glibc/2.14/custom/glibc-build/elf/librtld.os > -Wl,--version-script=/home/wintermute/tesi/glibc/2.14/custom/glibc-build/ld.map > \ > -Wl,-soname=ld-linux.so.2 -T > /home/wintermute/tesi/glibc/2.14/custom/glibc-build/elf/ld.so.lds > /home/wintermute/tesi/glibc/2.14/custom/glibc-build/elf/librtld.os: In > function `strcpy': > /home/wintermute/tesi/glibc/2.14/custom/glibc-2.14/string/strcpy.c:43: > undefined reference to `_Ux86_getcontext' > /home/wintermute/tesi/glibc/2.14/custom/glibc-2.14/string/strcpy.c:44: > undefined reference to `_ULx86_init_local' > collect2: ld returned 1 exit status > > Am I missing something? Sorry for asking a dumb question and thanks in > advance. > > -- > Kind regards, > Fabio Pozzi > > _______________________________________________ > Libunwind-devel mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/libunwind-devel > _______________________________________________ Libunwind-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/libunwind-devel
