1SCANELF(1)                Documentation for pax-utils               SCANELF(1)
2
3
4

NAME

6       scanelf - user-space utility to scan ELF files
7

SYNOPSIS

9       scanelf [options] ELFs or directories
10

DESCRIPTION

12       scanelf is a user-space utility to quickly scan given ELFs,
13       directories, or common system paths for different information. This may
14       include ELF types, their PaX markings, TEXTRELs, etc...
15

OPTIONS

17       -A, --archives
18           Scan archives (.a files)
19
20       -a, --all
21           Print all useful/simple info
22
23       -B, --nobanner
24           Don´t display the header
25
26       -b, --bind
27           Print symbol binding information (lazy or now)
28
29       -D, --endian
30           Print ELF endianness (big/little/...)
31
32       -E, --etype ETYPE
33           Print only ELF files matching specified etype (like ET_DYN,
34           ET_EXEC, etc...)
35
36       -e, --header
37           Print GNU_STACK markings
38
39       -F, --format FORMAT
40           Use specified format for output; see the FORMAT section for more
41           information
42
43       -f, --from FILE
44           Read input stream from specified filename
45
46       -g, --gmatch
47           Use strncmp to match libraries (use with -N). Or regexp with symbol
48           matching
49
50       -h, --help
51           Show condensed usage and exit
52
53       -I, --osabi
54           Print OSABI
55
56       -i, --interp
57           Print the interpreter information (.interp/PT_INTERP)
58
59       -k, --section SECTION
60           Find ELFs with the specified section
61
62       -L, --ldcache
63           Utilize ld.so.cache information (use with -r/-n)
64
65       -l, --ldpath
66           Scan all directories in /etc/ld.so.conf
67
68       -M, --bits BITS
69           Print only ELF files matching specified numeric bits (like 32/64)
70
71       -m, --mount
72           Don´t recursively cross mount points
73
74       -N, --lib SONAME
75           Find ELFs that need the specified SONAME
76
77       -n, --needed
78           Print libraries the ELF is linked against (DT_NEEDED)
79
80       -O, --perms PERMS
81           Print only ELF files with matching specified octal bits (like 755)
82
83       -o, --file FILE
84           Write output stream to specified filename
85
86       -p, --path
87           Scan all directories in PATH environment
88
89       -q, --quiet
90           Only output ´bad´ things
91
92       -R, --recursive
93           Scan directories recursively
94
95       -r, --rpath
96           Print runpaths encoded in the ELF (DT_RPATH/DT_RUNPATH)
97
98       -S, --soname
99           Print the ELF´s shared library name (DT_SONAME)
100
101       -s, --symbol SYMBOL
102           Find the specified symbol; see SYMBOL MATCHING for more info
103
104       -T, --textrels
105           Locate cause of TEXTRELs via objdump
106
107       -t, --textrel
108           Print TEXTREL information
109
110       -V, --version
111           Print version and exit
112
113       -v, --verbose
114           Be verbose (can be used more than once)
115
116       -X, --fix
117           Try and ´fix´ bad things (use with -r/-e)
118
119       -x, --pax
120           Print PaX markings
121
122       -Y, --eabi
123           Print EABI (only matters for a few architectures)
124
125       -y, --symlink
126           Don´t scan symlinks
127
128       -Z, --size SIZE
129           Print ELF file size
130
131       -z, --setpax FLAGS
132           Sets EI_PAX/PT_PAX_FLAGS to specified flags (use with -Xx)
133

FORMAT

135       The format string is much like a printf string in that it is a literal
136       string with flags requesting different information. For example, you
137       could use a format string and expect the following results.
138
139             # scanelf -BF "file %f needs %n; funky time" /bin/bash
140             file bash needs libncurses.so.5,libdl.so.2,libc.so.6; funky time
141
142
143       Note that when you use a format string, generally information related
144       flags should be omitted. In other words, you do not want to try and
145       request NEEDED output (-n) and try to specify a format output at the
146       sametime as these operations are mutually exclusive. Each information
147       related flag has an equivalent conversion specifier, so use those
148       instead. You can of course continue to use non-information related
149       flags (such as --verbose).
150
151       There are three characters that introduce conversion specifiers.
152
153       · % - replace with info
154       · # - silent boolean match
155       · + - verbose match
156
157
158       And there are a number of conversion specifiers. We try to match up the
159       specifier with corresponding option.
160
161       · a - machine (EM) type
162       · b - bind flags
163       · e - program headers
164       · D - endian
165       · I - osabi
166       · Y - eabi
167       · F - long filename
168       · f - short filename
169       · i - interp
170       · k - section
171       · M - EI class
172       · N - specified needed
173       · n - needed libraries
174       · p - filename (minus search)
175       · o - etype
176       · O - perms
177       · r - runpaths
178       · S - SONAME
179       · s - symbol
180       · T - all textrels
181       · t - textrel status
182       · x - pax flags
183
184

SYMBOL MATCHING

186       A - prefix will only show undefined references while a + prefix will
187       only show defined references while no prefix will show both.
188

ELF ETYPES

190       You can narrow your search by specifying the ELF object file type
191       (ETYPE). The commandline option takes the numeric value and or symbolic
192       type. Multiple values can be passed comma separated. Example -E
193       ET_EXEC,ET_DYN,1
194
195       Here is the normal list available for your pleasure. You of course are
196       free to specify any numeric value you want.
197
198       · 0 - ET_NONE - unknown type
199
200       · 1 - ET_REL - relocatable file
201       · 2 - ET_EXEC - executable file
202       · 3 - ET_DYN - shared object
203       · 4 - ET_CORE - core file
204
205

ELF BITS

207       You can also narrow your search by specifying the ELF bitsize. Again,
208       specify the numeric value or the symbolic define.
209
210       · 32 - ELFCLASS32 - 32bit ELFs
211       · 64 - ELFCLASS64 - 64bit ELFs
212
213

HOMEPAGE

215       http://hardened.gentoo.org/pax-utils.xml
216

REPORTING BUGS

218       Please include as much information as possible (using any available
219       debugging options) and send bug reports to the maintainers (see the
220       AUTHORS section). Please use the Gentoo bugzilla at
221       http://bugs.gentoo.org/ if possible.
222

SEE ALSO

224       chpax(1), dumpelf(1), paxctl(1), pspax(1), readelf(1), scanelf(1)
225

AUTHORS

227       Ned Ludd <solar@gentoo.org>
228           Maintainer
229
230       Mike Frysinger <vapier@gentoo.org>
231           Maintainer
232
233       Fabian Groffen <grobian@gentoo.org>
234           Mach-O Maintainer
235

NOTES

237        1. http://hardened.gentoo.org/pax-utils.xml
238
239        2. http://bugs.gentoo.org/
240
241
242
243pax-utils 0.2.1                   02/14/2010                        SCANELF(1)
Impressum