UNIX "ld" command -- search order, a correction.

brown at kpno.UUCP brown at kpno.UUCP
Mon Apr 16 04:50:36 AEST 1984


>From:  Ed_Hall <edhall at Rand-Unix.ARPA>
>
>The order that library directories are searched under 4.1 UNIX is:
>
>	/usr/lib/
>	/lib/
>	/usr/local/lib/
>
>If a given library is found in a given directory, subsequent directories
>will *not* be searched for that library.
>

Sorry, no seegar.  The order is:

		/lib
		/usr/lib
		/usr/local/lib

The above comment about stopping when a given library is found is quite true.
Has anyone thought about how to set up system programs arbitrary local
directories can be included in the search path?  There was a start at that
with /usr/include/local/uparm.h in 4.1BSD but very few programs use it.
Life is indeed difficult if you want to use /local/... instead of
/usr/local/...

For those of you with source take a look at ld.c sometime to see how the
directories are set up to be searched, truly a hack.  Reminds me of
v6...Ahhh the good ole days(I'm glad they're gone).  Troff does the same
stuff too.  For those that care this is for 4.?BSD.

	regards,
	Mike Brown	National Solar Observatory
			Tucson, Arizona			(602) 325-9249	

UUCP:	{akgua,allegra,arizona,decvax,hao,ihnp4,lbl-csam,
	 sdcarl,sdcsvax,seismo,trwspf,unc,utastronomy,ut-sally}	!kpno!brown

ARPA:	kpno!brown at LBL-CSAM.ARPA
CSNET:	brown at arizona



More information about the Comp.unix.wizards mailing list