A completely different approach to EH runtime

H . J . Lu hjl@valinux.com
Wed Feb 21 16:48:00 GMT 2001


On Wed, Feb 21, 2001 at 07:56:00PM -0300, Alexandre Oliva wrote:
> On Feb 21, 2001, "H . J . Lu" <hjl@valinux.com> wrote:
> 
> > Just think about you have more than libc.so.6 on your Linux machine in
> > different direcories and they are both visibible to ld-linux.so.2. Can
> > you tell me what may happen?
> 
> I see a few possible scenarios:
> 
> - it picks the first one it finds.

That won't work since some binaries may need the newest one.

> 
> - it picks the newest one.

What is the difference between having 2 libc.so and only having the
newest one?

> 
> - it looks at all the dependency libraries of the program, all the
> dependencies of libc.so.6 it finds, and chooses the one libc.so.6 that
> doesn't have dependencies that conflict with those of the program.

You lost me here. Assuming it works by some magic, you have

1. libfoo.so wants the new libc.so.6.
2. bar, which only needs the old libc.so.6, dlopens libfoo.so. When
bar runs, which libc.so.6 should ld.so load? Loading the old one
will upset libfoo.so when it is loaded in at the run-time via dlopen.

Now you may say ld.so always picks the newest one :-).

-- 
H.J. Lu (hjl@valinux.com)



More information about the Gcc mailing list