Re: [LIP] Re: [PLUG] 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]>
On Sat, Jun 12, 2004 at 03:52:45PM +0530, Swapnil Nagle 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)
> >
> 
> Maybe libc has a dependency on /lib/ld-linux.so.
> Another approach can be by using LD_PRELOAD.

That makes no sense, because ld-linux.so.2 itself is responsible for
loading LD_PRELOAD libraries.

BTW, the use of ldd above is also invalid, unless RTLDLIST within the
script ldd is edited. One way to check the dynamic linker is:

$ readelf -a a.out | grep interpreter
      [Requesting program interpreter: /tmp/foo.so]

I'd strongly suggest the use of chroot or LD_LIBRARY_PATH in testing
changes to core glibc i.e. files such as libc.so or ld-linux.so.

	-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.