Subject: Re: HEADS UP: migration to fully dynamic linked "base" system
To: None <current-users@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: current-users
Date: 08/26/2002 21:10:57
> >  > 2) using dlopen() in all programs.
> >  > 
> >  > Why are these two discussions being mixed? Are they totally inseparable?
> > 
> > Basically, yes.  dlopen() requires that the ELF interpreter be mapped,
> > and that only happens for dynamically-linked executables.
> 
> Then obviously the solution should be for the ELF interpreter to be mapped
> for static executables as well, not to start linking everything
> dynamic. :-)

No what you need to do is generate a dynamically loaded executable
that doesn't have a 'NEEDED' entry for lib.so.
However I can't seem to persuade ld to do that!

	cc -O2 x.c /usr/lib/libc.a -o y

Generates a binary with no unresolved symbols (and it has an ___start)
but unfortunately it still has a 'NEEDED' entry for libc.
(I haven't tried running it under a copy of ld.elf_so that fails
to load libc (yet)).

	David

-- 
David Laight: david@l8s.co.uk