Print this page
6205 onbld manuals should be declared as 1onbld
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Josef Sipek <jeffpc@josefsipek.net>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/tools/scripts/find_elf.1.man.txt
+++ new/usr/src/tools/scripts/find_elf.1onbld.man.txt
1 -find_elf(1) User Commands find_elf(1)
1 +find_elf(1ONBLD) illumos Build Tools find_elf(1ONBLD)
2 2
3 3
4 4
5 5 NAME
6 6 find_elf - Locate ELF shared objects and executables
7 7
8 8 SYNOPSIS
9 9 find_elf [-afrs] path
10 10
11 11 DESCRIPTION
12 12 The find_elf command descends a directory hierarchy and produces one
13 13 line of output on stdout for each ELF executable or shared object
14 14 found.
15 15
16 16 OPTIONS
17 17 The following options are supported:
18 18
19 19 -a Disable alias processing. Symbolic links are treated as independent
20 20 files, each such link results in a separate OBJECT output line, and
21 21 ALIAS lines are not issued.
22 22
23 23 -f Fast Mode. When reading directories, the file name and modes are
24 24 used to eliminate files from consideration and speed up the search:
25 25 Directories with names that start with a '.' character are skipped.
26 26 Executables must have the execute bit set, and shared objects must
27 27 end with a .so extension. Files that do not meet these requirements
28 28 are silently eliminated from consideration without further
29 29 analysis.
30 30
31 31 -r Report file names as relative paths, relative to the given file or
32 32 directory, instead of fully qualified.
33 33
34 34 -s Only report shared objects.
35 35
36 36 OUTPUT
37 37 find_elf produces a series of PREFIX, OBJECT, and ALIAS lines, which
38 38 collectively describe the ELF objects located. Whitespace is used
39 39 within each line to delimit the various fields of information provided.
40 40
41 41 If the -r option is used to specify that file names be reported as
42 42 relative paths, a PREFIX line is output to provide the base path from
43 43 which the relative names should be interpreted. There can only be one
44 44 PREFIX line, and it is output first, before any OBJECT or ALIAS lines.
45 45
46 46 PREFIX path
47 47
48 48 For each object found, an OBJECT line is produced to describe it:
49 49
50 50 OBJECT [32 | 64] [DYN | EXEC] [VERDEF | NOVERDEF] object-path
51 51
52 52 The first field provides the ELF class of the object, and will be
53 53 either 32 or 64. The second field provides the type of object, either
54 54 a shared object (DYN) or executable (EXEC). The third field will be
55 55 VERDEF if the object contains ELF version definitions, and NOVERDEF if
56 56 the object is not versioned. The final field gives the path to the
57 57 object.
58 58
59 59 Under Unix, a file can have multiple names. In the context of ELF
60 60 objects, this often happens for one of two reasons:
61 61
62 62 o Compilation symlinks, used to provide a non-versioned name
63 63 for a shared object.
64 64
65 65 o Symlinks such as '32' and '64' used to provide alternative
66 66 non-machine specific paths to objects.
67 67
68 68 When find_elf identifies an object via such an aliased name, it issues
69 69 an ALIAS line mapping it to the main name for the object:
70 70
71 71 ALIAS object-path alias-path
72 72
73 73 The -a option alters the handling of aliased names. When -a is
74 74 specified, each file results in a separate OBJECT line, as if they were
75 75 independent files rather than the same file with different names.
76 76
77 77
78 78 EXAMPLES
79 79 Assume the following hierarchy of files exist under /usr/lib/foo:
80 80
81 81 % /bin/ls -alRF /usr/lib/foo
82 82 /usr/lib/foo:
83 83 total 111
84 84 drwxr-xr-x 3 root root 7 Jul 16 17:35 ./
85 85 drwxr-xr-x 34 root root 42 Jul 16 17:34 ../
86 86 lrwxrwxrwx 1 root bin 1 Jul 16 17:34 32 -> ./
87 87 lrwxrwxrwx 1 root bin 5 Jul 16 17:34 64 -> amd64/
88 88 drwxr-xr-x 2 root bin 4 Jul 16 17:35 amd64/
89 89 lrwxrwxrwx 1 root bin 11 Jul 16 17:35 libfoo.so -> libfoo.so.1*
90 90 -rwxr-xr-x 1 root bin 49132 Jul 16 17:35 libfoo.so.1*
91 91
92 92 /usr/lib/foo/amd64:
93 93 total 150
94 94 drwxr-xr-x 2 root root 4 Jul 16 17:35 ./
95 95 drwxr-xr-x 3 root root 7 Jul 16 17:35 ../
96 96 lrwxrwxrwx 1 root bin 11 Jul 16 17:35 libfoo.so -> libfoo.so.1*
97 97 -rwxr-xr-x 1 root bin 72536 Jul 16 17:35 libfoo.so.1*
98 98
99 99 This hierarchy contains compilation symlinks (libfoo.so) and path alias
100 100 symlinks (32, 64), as discussed in OUTPUT. find_elf produces the
101 101 following output for the above hierarchy:
102 102
103 103 % find_elf -r /usr/lib/foo
104 104 PREFIX /usr/lib/foo
105 105 OBJECT 64 DYN VERDEF amd64/libfoo.so.1
106 106 ALIAS amd64/libfoo.so.1 64/libfoo.so
107 107 ALIAS amd64/libfoo.so.1 64/libfoo.so.1
108 108 ALIAS amd64/libfoo.so.1 amd64/libfoo.so
109 109 OBJECT 32 DYN VERDEF libfoo.so.1
110 110 ALIAS libfoo.so.1 32/libfoo.so
111 111 ALIAS libfoo.so.1 32/libfoo.so.1
112 112 ALIAS libfoo.so.1 libfoo.so
113 113
114 114 Contrast this with the output when -a is used to treat each name as an
115 115 independent file:
116 116
117 117 % find_elf -ar /usr/lib/foo
118 118 PREFIX /usr/lib/foo
119 119 OBJECT 32 DYN VERDEF 32/libfoo.so
120 120 OBJECT 32 DYN VERDEF 32/libfoo.so.1
121 121 OBJECT 64 DYN VERDEF 64/libfoo.so
122 122 OBJECT 64 DYN VERDEF 64/libfoo.so.1
123 123 OBJECT 64 DYN VERDEF amd64/libfoo.so.1
124 124 OBJECT 64 DYN VERDEF amd64/libfoo.so
125 125 OBJECT 32 DYN VERDEF libfoo.so.1
126 126 OBJECT 32 DYN VERDEF libfoo.so
127 127
128 128 When find_elf is used to process an alias for which no target object is
129 129 given, there will be no output. For example, using /lib/libc.so, which
130 130 is a compilation symlink for /lib/libc.so.1:
131 131
132 132 % find_elf /lib/libc.so
↓ open down ↓ |
121 lines elided |
↑ open up ↑ |
133 133
134 134 In such situations, the -a option can be used to produce the desired
135 135 output:
136 136
137 137 % find_elf -a /lib/libc.so
138 138 OBJECT 32 DYN VERDEF /lib/libc.so
139 139
140 140
141 141
142 142 SEE ALSO
143 - check_rtime(1), interface_check(1), interface_cmp(1), ld(1), ldd(1),
144 - elfdump(1), pvs(1).
143 + check_rtime(1ONBLD), interface_check(1ONBLD), interface_cmp(1ONBLD),
144 + ld(1), ldd(1), elfdump(1), pvs(1).
145 145
146 146
147 147
148 - 25 March 2010 find_elf(1)
148 + 25 March 2010 find_elf(1ONBLD)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX