Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* dlopen() et al loads multiple copies of same shared lib
@ 1999-03-11 11:39 Uncle George
  1999-03-13 17:46 ` Richard Henderson
  0 siblings, 1 reply; 3+ messages in thread
From: Uncle George @ 1999-03-11 11:39 UTC (permalink / raw)
  To: drepper, axp-list

my cwd is /usr/JAVA/d/jsrc12a/build/genunix

with LD_LIBRARY_PATH=lib/alpha/green_threads:lib/alpha/classic

with a
dlopen("/usr/JAVA/d/jsrc12a/build/genunix/lib/alpha/libjava_g.so", ... )

I am able to load up the expected "libjava_g.so" shared file.

Later on there is a
dlopen("/usr/JAVA/d/jsrc12a/build/genunix/lib/alpha/libzip_g.so", ... )

    BUT there is a hitch. in libzip_g.so - there is a ref to
libjava_g.so

        then the loader also loads in another copy if libjava_g.so. This
copy is created from a
        composite of the LD_LIBRARY_PATH & the required share library.
It opens
        "lib/alpha/green_threads/libjava_g.so", tries to match the names
in the _dl_loaded
        table, but none of them  match

"/usr/JAVA/d/jsrc12a/build/genunix/lib/alpha/green_threads/libjava_g.so"
-

                                        ergo 2 copies

with gdb u get from an "info share"

Program exited normally.
(gdb) info share
From                To                  Syms Read   Shared Object
Library
0x0000020000110000  0x0000020000233c70  Yes
/usr/JAVA/d/jsrc12a/build/genunix/lib/alpha/green_threads/libhpi_g.so
0x0000020000234000  0x00000200003cd864  Yes
/usr/JAVA/d/jsrc12a/build/genunix/lib/alpha/classic/libjvm_g.so
0x00000200003ce000  0x00000200004d4570  Yes         /lib/libdl.so.2.1
0x00000200004d6000  0x00000200006ab098  Yes         /lib/libc.so.6.1
0x00000200006ac000  0x00000200007b2a40  Yes         /lib/libnsl.so.1.1
0x00000200007b4000  0x00000200008df790  Yes         /lib/libm.so.6.1
0x0000020000000000  0x000002000010edd8  Yes         /lib/ld-linux.so.2
0x00000200048e0000  0x0000020004a1d0b8  Yes
/usr/JAVA/d/jsrc12a/build/genunix/lib/alpha/libjava_g.so
<==== COPY 1
0x0000020004a1e000  0x0000020004b31ab8  Yes
/usr/JAVA/d/jsrc12a/build/genunix/lib/alpha/libzip_g.so
0x0000020004b32000  0x0000020004c6f0b8  Yes
/usr/JAVA/d/jsrc12a/build/genunix/lib/alpha/libjava_g.so
<=====COPY 2
0x0000020004cb4000  0x0000020004dbeea0  Yes
/lib/libnss_files.so.1.1
0x0000020004dc0000  0x0000020004f2cb60  Yes
/usr/JAVA/d/jsrc12a/build/genunix/lib/alpha/libaudio_g.so


I'd like to fix it, but i like my philosophy, and dont know what the
current standards to searchorder/techniques are to the dlopen() et al.
It would probably be good to match the library names absolutely, and
maybe the paths to the shared libraries separately.

gat




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-03-15 17:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-03-11 11:39 dlopen() et al loads multiple copies of same shared lib Uncle George
1999-03-13 17:46 ` Richard Henderson
1999-03-13 19:52   ` Uncle George

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox