Subject: misc/742: LD_* environment vars are not documented
To: None <gnats-admin@NetBSD.ORG>
From: None <jhawk@MIT.EDU>
List: netbsd-bugs
Date: 01/20/1995 03:50:04
>Number:         742
>Category:       misc
>Synopsis:       LD_* environment vars are not documented
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people (Misc Bug People)
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 20 03:50:02 1995
>Originator:     John Hawkinson
>Organization:
MIT
>Release:        1.0
>Environment:
System: NetBSD I-See-Everything-Twice 1.0 NetBSD 1.0 (YOAV) #0: Wed Jan 18 18:05:13 EST 1995 jhawk@I-See-Everything-Twice:/usr/src/sys/arch/i386/compile/YOAV i386


>Description:

	The LD_* environment variables don't seem to be documented.
	Since as best I can tell, link(5) seems to be doing the
	job of ld.so(1) (the latter does not exist), I've added
	some documentation there, based on a quick read of rtld.c.

	It should be noted that ldd(1) references ld.so(1), and not
	link(5), which is wrong...
	
>How-To-Repeat:
>Fix:

===================================================================
RCS file: /afs/sipb/project/netbsd/dev/netbsd-source/src/share/man/man5/link.5,v
retrieving revision 1.1
diff -c -r1.1 /afs/sipb/project/netbsd/dev/netbsd-source/src/share/man/man5/link.5
*** 1.1	1995/01/20 10:26:32
--- /afs/sipb/project/netbsd/dev/netbsd-source/src/share/man/man5/link.5	1995/01/20 11:28:46
***************
*** 555,561 ****
  Next bucket in case of hashing collisions.
  .El
  
  .Sh CAVEATS
  Only the (GNU) C compiler currently supports the creation of shared libraries.
  Other programming languages can not be used.
  
--- 555,622 ----
  Next bucket in case of hashing collisions.
  .El
  
+ .Sh ENVIRONMENT
+ 
+ The following environment variables effect the behavior of the
+ run-time linker during execution.
+ .Pp
+ .Ev LD_LIBRARY_PATH
+ contains a colon-seperated list of directories which are searched
+ for shareable libraries prior to the default path (determined
+ by
+ .Pa /var/run/ld.so.hints
+ as configured by
+ .Xr ldconfig 1 ) . 
+ .Pp
+ If
+ .Ev LD_NOSTD_PATH
+ is set, the default search path is not consulted.
+ .Pp
+ .Ev LD_PRELOAD
+ is currently not implemented. It would specify a module to be loaded
+ prior to searching for libraries.
+ .Pp
+ .Ev LD_RUN_PATH
+ is currently not implemented. It would be searched at run-time prior
+ to
+ .Ev LD_LIBRARY_PATH .
+ .Pp
+ .Ev LD_LIBRARY_PATH ,
+ .Ev LD_PRELOAD ,
+ and
+ .Ev LD_RUN_PATH
+ are all ignored when a process' effective uid and gid do not
+ match the real uid and gid (eg: for setuid and setgid programs) for
+ security reasons.
+ .Pp
+ If set,
+ .Ev LD_TRACE_LOADED_OBJECTS
+ causes the run-time linker to output the libraries that would be
+ loaded. This output is similar to that of
+ .Xr ldd 1 .
+ .Pp
+ If set,
+ .Ev LD_SUPPRESS_WARNINGS
+ causes the run-time linker not to print warning messages about newer
+ minor versions of shareable libraries, as well as warnings about
+ non-pure code.
+ .Pp
+ .Ev LD_WARN_NON_PURE_CODE
+ causes warnings about non-pure code to be printed.
  .Sh CAVEATS
  Only the (GNU) C compiler currently supports the creation of shared libraries.
  Other programming languages can not be used.
  
! .Sh SEE ALSO
! .Xr ld 1 ,
! .Xr ldconfig 1 ,
! .Xr ldd 1 ,
! .Xr nm 1 ,
! .Xr a.out 5
! 
! .Sh HISTORY
! A
! .Nm link
! man page first appeared in SunOS 4.0; it appreared in its current form
! in NetBSD 0.9a.
! 
>Audit-Trail:
>Unformatted: