This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v8] Add pretty printers for the NPTL lock types
- From: Martin Galvan <martin dot galvan at tallertechnologies dot com>
- To: Siddhesh Poyarekar <siddhesh at sourceware dot org>
- Cc: libc-alpha at sourceware dot org, "Carlos O'Donell" <carlos at redhat dot com>
- Date: Fri, 24 Jun 2016 18:03:10 -0300
- Subject: Re: [PATCH v8] Add pretty printers for the NPTL lock types
- Authentication-results: sourceware.org; auth=none
- References: <20160608153841 dot GA8366 at devel dot intra dot reserved-bit dot com> <CAOKbPbZCbrfM=FRq6e7C3c8uXp9v+BODAoh6Qat7XRwOb5cEHA at mail dot gmail dot com> <20160619164448 dot GA5245 at devel dot intra dot reserved-bit dot com> <CAOKbPbYpRcwJ8QNSgvW9BxkOeTSBnWEGGFRMOY=RSzoK6k1-Bw at mail dot gmail dot com> <20160620041246 dot GB5245 at devel dot intra dot reserved-bit dot com> <CAOKbPbZknCcBGozK_v8SC=PyJdczwr7ss6Y1y1hs2x8ag7cpxA at mail dot gmail dot com> <20160623164003 dot GC17911 at devel dot intra dot reserved-bit dot com> <CAOKbPbbp=-3XgwogxN90EGZxOPjiT_hkEWnaMuB4uz5Ox-njPw at mail dot gmail dot com> <20160624165111 dot GD30229 at devel dot intra dot reserved-bit dot com> <CAOKbPbZk8ONZ8pRMbFV72ek0p6=wk1GRZKF_2RCpz4LmnYt_zw at mail dot gmail dot com> <20160624203223 dot GE30229 at devel dot intra dot reserved-bit dot com> <CAOKbPbbfHoNHpHrZgaTg3+MNQf7nE5XNe7rQyGSRL6P1sDubSw at mail dot gmail dot com> <CAOKbPbZ4spYsX242c_xiieL-TgaLqLBMzmD3G1VoZZGAJqaPXQ at mail dot gmail dot com>
I just tried running the test program on a separate laptop and it
failed to work because it couldn't find the libraries. Ldd still
showed:
linux-vdso.so.1 => (0x00007fff611fe000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fc72fe5e000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fc72fa99000)
/home/martin/glibc/install/lib/ld-linux-x86-64.so.2 =>
/lib64/ld-linux-x86-64.so.2 (0x00007fc7300a3000)
I wonder how that last path got hardcoded there?
On Fri, Jun 24, 2016 at 5:46 PM, Martin Galvan
<martin.galvan@tallertechnologies.com> wrote:
> I added an endless loop to the test code, so that I could examine its
> proc mappings without running it through gdb, and I'm still seeing the
> built libraries. And yeah, you're right in that it's being compiled
> using rpath-link:
>
> gcc -nostdlib -nostartfiles -o
> /home/martin/glibc/build/pretty-printers/test-mutex-printer
> -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both
> /home/martin/glibc/build/csu/crt1.o
> /home/martin/glibc/build/csu/crti.o `gcc
> --print-file-name=crtbegin.o`
> /home/martin/glibc/build/pretty-printers/test-mutex-printer.o
> /home/martin/glibc/build/nptl/libpthread_nonshared.a
> /home/martin/glibc/build/nptl/libpthread.so
> -Wl,-dynamic-linker=/home/martin/glibc/install/lib/ld-linux-x86-64.so.2
> -Wl,-rpath-link=/home/martin/glibc/build:/home/martin/glibc/build/math:/home/martin/glibc/build/elf:/home/martin/glibc/build/dlfcn:/home/martin/glibc/build/nss:/home/martin/glibc/build/nis:/home/martin/glibc/build/rt:/home/martin/glibc/build/resolv:/home/martin/glibc/build/crypt:/home/martin/glibc/build/mathvec:/home/martin/glibc/build/nptl
> /home/martin/glibc/build/libc.so.6
> /home/martin/glibc/build/libc_nonshared.a -Wl,--as-needed
> /home/martin/glibc/build/elf/ld.so -Wl,--no-as-needed -lgcc
> -Wl,--as-needed -lgcc_s -Wl,--no-as-needed `gcc
> --print-file-name=crtend.o` /home/martin/glibc/build/csu/crtn.o
--
Martin Galvan
Software Engineer
Taller Technologies Argentina
San Lorenzo 47, 3rd Floor, Office 5
CÃrdoba, Argentina
Phone: 54 351 4217888 / +54 351 4218211