Print this page
6282 ONBLD man pages not pbchk clean
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Josef Sipek <jeffpc@josefsipek.net>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/tools/scripts/find_elf.1onbld.man.txt
+++ new/usr/src/tools/scripts/find_elf.1onbld.man.txt
1 -find_elf(1ONBLD) illumos Build Tools find_elf(1ONBLD)
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*
↓ open down ↓ |
78 lines elided |
↑ open up ↑ |
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 - symlinks (32, 64), as discussed in OUTPUT. find_elf produces the
101 - following output for the above hierarchy:
100 + symlinks (32, 64), as discussed in OUTPUT.
102 101
102 + find_elf produces the following output for the above hierarchy:
103 +
103 104 % find_elf -r /usr/lib/foo
104 105 PREFIX /usr/lib/foo
105 106 OBJECT 64 DYN VERDEF amd64/libfoo.so.1
106 107 ALIAS amd64/libfoo.so.1 64/libfoo.so
107 108 ALIAS amd64/libfoo.so.1 64/libfoo.so.1
108 109 ALIAS amd64/libfoo.so.1 amd64/libfoo.so
109 110 OBJECT 32 DYN VERDEF libfoo.so.1
110 111 ALIAS libfoo.so.1 32/libfoo.so
111 112 ALIAS libfoo.so.1 32/libfoo.so.1
112 113 ALIAS libfoo.so.1 libfoo.so
113 114
114 115 Contrast this with the output when -a is used to treat each name as an
115 116 independent file:
116 117
117 118 % find_elf -ar /usr/lib/foo
118 119 PREFIX /usr/lib/foo
119 120 OBJECT 32 DYN VERDEF 32/libfoo.so
120 121 OBJECT 32 DYN VERDEF 32/libfoo.so.1
121 122 OBJECT 64 DYN VERDEF 64/libfoo.so
122 123 OBJECT 64 DYN VERDEF 64/libfoo.so.1
123 124 OBJECT 64 DYN VERDEF amd64/libfoo.so.1
124 125 OBJECT 64 DYN VERDEF amd64/libfoo.so
125 126 OBJECT 32 DYN VERDEF libfoo.so.1
126 127 OBJECT 32 DYN VERDEF libfoo.so
127 128
128 129 When find_elf is used to process an alias for which no target object is
129 130 given, there will be no output. For example, using /lib/libc.so, which
130 131 is a compilation symlink for /lib/libc.so.1:
131 132
132 133 % find_elf /lib/libc.so
133 134
134 135 In such situations, the -a option can be used to produce the desired
135 136 output:
136 137
137 138 % find_elf -a /lib/libc.so
↓ open down ↓ |
25 lines elided |
↑ open up ↑ |
138 139 OBJECT 32 DYN VERDEF /lib/libc.so
139 140
140 141
141 142
142 143 SEE ALSO
143 144 check_rtime(1ONBLD), interface_check(1ONBLD), interface_cmp(1ONBLD),
144 145 ld(1), ldd(1), elfdump(1), pvs(1).
145 146
146 147
147 148
148 - 25 March 2010 find_elf(1ONBLD)
149 +
150 + March 25, 2010 FIND_ELF(1ONBLD)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX