1.\" $NetBSD: ld.so.conf.5,v 1.16 2002/02/13 08:18:13 ross Exp $ 2.\" 3.\" Copyright (c) 1996 Matthew R. Green 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. The name of the author may not be used to endorse or promote products 15.\" derived from this software without specific prior written permission. 16.\" 17.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 22.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 24.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27.\" SUCH DAMAGE. 28.\" 29.Dd August 24, 1997 30.Dt LD.SO.CONF 5 31.Os 32.Sh NAME 33.Nm ld.so.conf 34.Nd run-time link-editor configuration file 35.Sh DESCRIPTION 36The 37.Nm 38file specifies additional default directories (beyond the standard set, 39normally 40.Dq /usr/lib 41). 42.Pp 43On 44.Xr a.out 5 45systems, this file is scanned by 46.Xr ldconfig 8 47to create the hints files used by the run-time linker 48.Pa /usr/libexec/ld.so 49to locate shared libraries. 50.Pp 51On elf 52.\" .Xr elf 5 53systems, this file is scanned directly by the run-time linker 54.Pa /usr/libexec/ld.elf_so . 55.Pp 56Lines beginning with 57.Dq # 58are treated as comments and ignored. Any other non-blank lines beginning 59with '/' are stripped of leading whitespace and trailing comments 60(introduced with 61.Dq # ) 62together with any preceding whitespace, then treated as directories to be 63scanned for shared libraries to add to the hints. 64.Pp 65On elf 66.\" .Xr elf 5 67lines that do not begin with a '/' are parsed as hardware dependent per 68library directives: 69.sp 70.nf 71\*[Lt]library_name\*[Gt] \*[Lt]sysctl_variable\*[Gt] \*[Lt]variable_value\*[Gt][,...]:\*[Lt]library_name\*[Gt][,...] ... 72.fi 73.sp 74If there is no match, the standard action is taken. 75.Sh FILES 76.Pa /etc/ld.so.conf 77.Sh EXAMPLES 78.sp 79.nf 80libm.so.0 machdep.fpu_present 1:libm387.so.0,libm.so.0 81.fi 82.sp 83The above line loads both libm387 and libm when the 84.Xr sysctl 3 85variable fpu_present has the value 1. 86.Sh SEE ALSO 87.\" .Xr ld.elf_so 1 88.Xr ld.aout_so 1 , 89.Xr a.out 5 , 90.Xr elf 5 , 91.Xr ldconfig 8 92.Sh HISTORY 93The 94.Nm 95file appeared in 96.Nx 1.3 . 97The ELF support for it was added in 98.Nx 1.5 . 99.Sh BUGS 100Directory names containing the comment character 101.Pq Dq # 102and/or leading or trailing whitespace cannot be included. (Embedded blanks 103are allowed, however.) 104