1.\" $NetBSD: ld.so.conf.5,v 1.21 2017/07/03 21:30:59 wiz 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.\" 15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 20.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 22.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 23.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25.\" SUCH DAMAGE. 26.\" 27.Dd July 21, 2004 28.Dt LD.SO.CONF 5 29.Os 30.Sh NAME 31.Nm ld.so.conf 32.Nd run-time link-editor configuration file 33.Sh DESCRIPTION 34The 35.Nm 36file specifies additional default directories (beyond the standard set, 37normally 38.Dq Pa /usr/lib ) . 39.Pp 40On 41.Xr a.out 5 42systems, this file is scanned by 43.Xr ldconfig 8 44to create the hints files used by the run-time linker 45.Pa /usr/libexec/ld.so 46to locate shared libraries. 47.Pp 48On 49.Xr elf 5 50systems, this file is scanned directly by the run-time linker 51.Pa /usr/libexec/ld.elf_so . 52.Pp 53Lines beginning with 54.Sq # 55are treated as comments and ignored. 56Any other non-blank lines beginning 57with 58.Sq / 59are stripped of leading whitespace and trailing comments 60(introduced with 61.Sq # ) 62together with any preceding whitespace, then treated as directories to be 63scanned for shared libraries to add to the hints. 64.Pp 65On 66.Xr elf 5 67lines that do not begin with a 68.Sq / 69are parsed as hardware dependent per 70library directives: 71.Bd -literal 72<library> <sysctl> <variable>[,...]:<library>[,...] ... 73.Ed 74.Pp 75If there is no match, the standard action is taken. 76.Sh FILES 77.Pa /etc/ld.so.conf 78.Sh EXAMPLES 79.Bd -literal 80libm.so.0 machdep.fpu_present 1:libm387.so.0,libm.so.0 81.Ed 82.Pp 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.aout_so 1 , 88.Xr ld.elf_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 Sq # 102and/or leading or trailing whitespace cannot be included. 103(Embedded blanks are allowed, however.) 104