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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.