Subject: Re: static vs. dynamic runtime linking, again (was: PAM and su -K)
To: NetBSD Userlevel Technical Discussion List <tech-userlevel@NetBSD.ORG>
From: Ian Lance Taylor <ian@airs.com>
List: tech-userlevel
Date: 01/27/2005 22:38:57
"Greg A. Woods" <woods@weird.com> writes:

> All AT&T UNIX System V Release 4 ports used only '-L', and they're the
> _true_ origin of ELF, even as admited by NetBSD's elf(5) manual; 

This turns out not to be the case.  The SVR4 linker does not default
the runtime search path to the -L arguments.

> SunOS-5 also defaults the runtime path to the '-L' path(s) of course,
> and I seem to remember others too, but my memory of which actually used
> anything like ELF is now rather fuzzy.

SunOS5 is Solaris, which acts like SVR4 and does not set the runtime
search path to the -L arguments.  Perhaps you mean SunOS4, which did.
SunOS4 used a.out, not ELF, but the SVR4/Solaris linker, and ELF in
general, is based on the SunOS4 linker.

> So, on all "proper" ELF implementations that I've ever used the run-time
> search path for shared objects defaults to the '-L' path(s) they were
> initially ``linked'' with, AS WELL AS to the default run-time search
> path.

I, on the other hand, have never seen an ELF implementation which
works this way.

Ian