xref: /minix3/usr.bin/ldd/ldd.1 (revision 4b999f1962a12177a033eaa0986990e1422be3ad)
1*4b999f19SBen Gras.\"	$NetBSD: ldd.1,v 1.18 2009/09/07 20:06:21 wiz Exp $
2*4b999f19SBen Gras.\"
3*4b999f19SBen Gras.\" Copyright (c) 1998 The NetBSD Foundation, Inc.
4*4b999f19SBen Gras.\" All rights reserved.
5*4b999f19SBen Gras.\"
6*4b999f19SBen Gras.\" This code is derived from software contributed to The NetBSD Foundation
7*4b999f19SBen Gras.\" by Paul Kranenburg.
8*4b999f19SBen Gras.\"
9*4b999f19SBen Gras.\" Redistribution and use in source and binary forms, with or without
10*4b999f19SBen Gras.\" modification, are permitted provided that the following conditions
11*4b999f19SBen Gras.\" are met:
12*4b999f19SBen Gras.\" 1. Redistributions of source code must retain the above copyright
13*4b999f19SBen Gras.\"    notice, this list of conditions and the following disclaimer.
14*4b999f19SBen Gras.\" 2. Redistributions in binary form must reproduce the above copyright
15*4b999f19SBen Gras.\"    notice, this list of conditions and the following disclaimer in the
16*4b999f19SBen Gras.\"    documentation and/or other materials provided with the distribution.
17*4b999f19SBen Gras.\"
18*4b999f19SBen Gras.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19*4b999f19SBen Gras.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20*4b999f19SBen Gras.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21*4b999f19SBen Gras.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22*4b999f19SBen Gras.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23*4b999f19SBen Gras.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24*4b999f19SBen Gras.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25*4b999f19SBen Gras.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26*4b999f19SBen Gras.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27*4b999f19SBen Gras.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28*4b999f19SBen Gras.\" POSSIBILITY OF SUCH DAMAGE.
29*4b999f19SBen Gras.\"
30*4b999f19SBen Gras.Dd September 7, 2009
31*4b999f19SBen Gras.Dt LDD 1
32*4b999f19SBen Gras.Os
33*4b999f19SBen Gras.Sh NAME
34*4b999f19SBen Gras.Nm ldd
35*4b999f19SBen Gras.Nd list dynamic object dependencies
36*4b999f19SBen Gras.Sh SYNOPSIS
37*4b999f19SBen Gras.Nm
38*4b999f19SBen Gras.Op Fl o
39*4b999f19SBen Gras.Op Fl f Ar format
40*4b999f19SBen Gras.Ar program ...
41*4b999f19SBen Gras.Sh DESCRIPTION
42*4b999f19SBen Gras.Nm
43*4b999f19SBen Grasdisplays all shared objects that are needed to run the given program.
44*4b999f19SBen GrasContrary to
45*4b999f19SBen Gras.Xr nm 1 ,
46*4b999f19SBen Grasthe list includes
47*4b999f19SBen Gras.Dq indirect
48*4b999f19SBen Grasdependencies that are the result of needed shared objects which themselves
49*4b999f19SBen Grasdepend on yet other shared objects.
50*4b999f19SBen GrasZero, one or two
51*4b999f19SBen Gras.Fl f
52*4b999f19SBen Grasoptions may be given.
53*4b999f19SBen GrasThe argument is a format string passed to
54*4b999f19SBen Gras.Xr rtld 1
55*4b999f19SBen Grasand allows customization of
56*4b999f19SBen Gras.Nm ldd Ns 's
57*4b999f19SBen Grasoutput.
58*4b999f19SBen GrasThe first format argument is used for library objects and defaults to
59*4b999f19SBen Gras.Qq "\et-l%o.%m =\*[Gt] %p\en" .
60*4b999f19SBen GrasThe second format argument is used for non-library objects and defaults to
61*4b999f19SBen Gras.Qq "\et%o =\*[Gt] %p\en" .
62*4b999f19SBen Gras.Pp
63*4b999f19SBen GrasThese arguments are interpreted as format strings a la
64*4b999f19SBen Gras.Xr printf 3
65*4b999f19SBen Grasto customize the trace output and allow
66*4b999f19SBen Gras.Nm
67*4b999f19SBen Grasto be operated as a filter more conveniently.
68*4b999f19SBen GrasThe following conversions can be used:
69*4b999f19SBen Gras.Bl -tag -width xxxx
70*4b999f19SBen Gras.It \&%a
71*4b999f19SBen GrasThe main program's name
72*4b999f19SBen Gras.Po also known as
73*4b999f19SBen Gras.Dq __progname
74*4b999f19SBen Gras.Pc .
75*4b999f19SBen Gras.It \&%A
76*4b999f19SBen GrasThe value of the environment variable
77*4b999f19SBen Gras.Ev LD_TRACE_LOADED_OBJECTS_PROGNAME
78*4b999f19SBen Grasin a.out and the program name from the argument vector from elf.
79*4b999f19SBen Gras.It \&%o
80*4b999f19SBen GrasThe library name.
81*4b999f19SBen Gras.It \&%m
82*4b999f19SBen GrasThe library's major version number.
83*4b999f19SBen Gras.It \&%n
84*4b999f19SBen GrasThe library's minor version number (a.out only, ignored in elf).
85*4b999f19SBen Gras.It \&%p
86*4b999f19SBen GrasThe full pathname as determined by
87*4b999f19SBen Gras.Nm rtld Ns 's
88*4b999f19SBen Graslibrary search rules.
89*4b999f19SBen Gras.It \&%x
90*4b999f19SBen GrasThe library's load address
91*4b999f19SBen Gras.El
92*4b999f19SBen Gras.Pp
93*4b999f19SBen GrasAdditionally,
94*4b999f19SBen Gras.Sy \en
95*4b999f19SBen Grasand
96*4b999f19SBen Gras.Sy \et
97*4b999f19SBen Grasare recognized and have their usual meaning.
98*4b999f19SBen Gras.Pp
99*4b999f19SBen GrasThe
100*4b999f19SBen Gras.Fl o
101*4b999f19SBen Grasoption is an alias for
102*4b999f19SBen Gras.Fl f
103*4b999f19SBen Gras.Ar \&%a:-l\&%o.\&%m =\*[Gt] \&%p\en ,
104*4b999f19SBen Graswhich makes
105*4b999f19SBen Gras.Nm
106*4b999f19SBen Grasbehave analogously to
107*4b999f19SBen Gras.Ic nm Fl o .
108*4b999f19SBen Gras.Sh SEE ALSO
109*4b999f19SBen Gras.Xr ld 1 ,
110*4b999f19SBen Gras.Xr ld.elf_so 1 ,
111*4b999f19SBen Gras.Xr nm 1 ,
112*4b999f19SBen Gras.Xr rtld 1
113*4b999f19SBen Gras.Sh HISTORY
114*4b999f19SBen GrasA
115*4b999f19SBen Gras.Nm
116*4b999f19SBen Grasutility first appeared in SunOS 4.0, it appeared in its current form
117*4b999f19SBen Grasin
118*4b999f19SBen Gras.Nx 0.9a .
119*4b999f19SBen Gras.Sh BUGS
120*4b999f19SBen GrasThe
121*4b999f19SBen Grasa.out
122*4b999f19SBen Gras.Nm
123*4b999f19SBen Grasactually runs the program it has been requested to analyze which in specially
124*4b999f19SBen Grasconstructed environments can have security implications.
125