Linking custom ld-linux.so.2 for a shared library.

KDLinux <kdlinux2001-/[email protected]>
Newsgroups gmane.org.user-groups.linux.plug,gmane.user-groups.linux.india.programmers
Message-ID <[email protected]>
Hi all,
 I am trying to create a shared library, in which I
want to link a custom ld-linux.so.2 rather than
picking from /lib, the default location.

 Say, My sources are a.c and b.c and I compiled them 
using gcc, to produce object files, a.o and b.o. Now,
I want to link them to form shared library, libab.so.
So, I tried the --dynamic-linker option.

 My command line says,

 gcc -shared -Wl,-soname,libab.so -Wl,--dynamic-linker
/new/lib/ld-linux.so.2 -o libab.so a.o b.o

 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)

 How can I link to ld-linux.so.2 ? The ld man page
says, --dynamic-linker is available only for elf
executables. Is there any command line option, I can
use to link custom ld-linux.so.2 to create a shared
library. 

TIA,

=====
-- KD.
www.kirandivekar.cjb.net


	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/
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.