I don't even know if this is possible...

but let's say I have a file that dynamically links to a library, such as libc.so.6
If I run ldd on it, I get the following output:
Code:
    linux-vdso.so.1 =>  (0x00007fff94bfe000)
    librt.so.1 => /lib/librt.so.1 (0x00007f798c6b5000)
    libselinux.so.1 => /lib/libselinux.so.1 (0x00007f798c499000)
    libacl.so.1 => /lib/libacl.so.1 (0x00007f798c291000)
    libc.so.6 => /lib/libc.so.6 (0x00007f798bf1f000)
    libpthread.so.0 => /lib/libpthread.so.0 (0x00007f798bd03000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f798c8bd000)
    libdl.so.2 => /lib/libdl.so.2 (0x00007f798baff000)
    libattr.so.1 => /lib/libattr.so.1 (0x00007f798b8fa000)
Let's say I want to try a slightly different version of the c library without breaking anything else on my system. So I want this to link to, say, with /tmp/lib/libc.so.6 instead. Setting LD_LIBRARY_PATH to /tmp/lib/ does not seem to do the trick. If I add both paths to ldconfig, I'm not sure if bad things will happen. Any ideas?

Thanks!