libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libunwind-devel] Build glibc linking libunwind


From: Joe Damato
Subject: Re: [Libunwind-devel] Build glibc linking libunwind
Date: Sat, 24 Sep 2011 15:16:25 -0700

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 <address@hidden> 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
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/libunwind-devel
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]