Re: [LIP] Linking custom ld-linux.so.2 for a shared library.
Arun Sharma <[email protected]>
| Newsgroups | gmane.user-groups.linux.india.programmers |
|---|---|
| Message-ID | <[email protected]> |
KDLinux wrote:
> The library gets created, but it links to local
> ld-linux.so.2. Verified by,
>
> $ ldd libab.so
> libc.so.6 => /new/lib/libc.so.6 (0x40009000)
> /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
>
I think your problem is the LD_LIBRARY_PATH. You need to put /new/lib
ahead of /lib. Alternatively,
$ cp /lib/ld-linux.so.2 /tmp/foo.so
$ gcc -v -Wl,--dynamic-linker=/tmp/foo.so t.c
$ ldd a.out
libc.so.6 => /lib/tls/libc.so.6 (0x00425000)
/tmp/foo.so => /tmp/foo.so (0x0040d000)
-Arun
-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504