scanelf
-A, --archives
-a, --all
-B, --nobanner
-b, --bind
-D, --endian
-E, --etype ETYPE
-e, --header
-F, --format FORMAT
-f, --from FILE
-g, --gmatch
-h, --help
-I, --osabi
-i, --interp
-k, --section SECTION
-L, --ldcache
-l, --ldpath
-M, --bits BITS
-m, --mount
-N, --lib SONAME
-n, --needed
-O, --perms PERMS
-o, --file FILE
-p, --path
-q, --quiet
-R, --recursive
-r, --rpath
-S, --soname
-s, --symbol SYMBOL
-T, --textrels
-t, --textrel
-V, --version
-v, --verbose
-X, --fix
-x, --pax
-Y, --eabi
-y, --symlink
-Z, --size SIZE
-z, --setpax FLAGS
--use-ldpath
--root PATH
The format string is much like a printf string in that it is a literal string with flags requesting different information. For example, you could use a format string and expect the following results.
# scanelf -BF "file %f needs %n; funky time" /bin/bash file bash needs libncurses.so.5,libdl.so.2,libc.so.6; funky time
Note that when you use a format string, generally information related flags should be omitted. In other words, you do not want to try and request NEEDED output (-n) and try to specify a format output at the same time as these operations are mutually exclusive. Each information related flag has an equivalent conversion specifier, so use those instead. You can of course continue to use non-information related flags (such as --verbose).
There are three characters that introduce conversion specifiers.
• % - replace with info
And there are a number of conversion specifiers. We try to match up the specifier with corresponding option.
• a - machine (EM) type
The string specified takes the form [%[modifiers]%][[+-]<symbol name>][,[.....]].
If the symbol name is empty, then all symbols are matched.
If the symbol name is a glob ("*"), then all symbols are dumped in a debug format. Do not rely on the structure of this output as it changes whenever we feel like it.
If the first char of the symbol name is a plus ("+"), then only match defined symbols. If it's a minus ("-"), only match undefined symbols. When we say "defined", we mean the symbol is defined in the ELF vs having an external reference.
Putting modifiers in between the percent signs ("%") allows for more in depth filters. There are groups of modifiers. If you don't specify a member of a group, then all types in that group are matched.
• STT group (symbol type)
You can search for multiple symbols simultaneously by using a comma (",") to separate different searches. Every symbol that matches will be displayed while unmatched symbols will not.
You can narrow your search by specifying the ELF object file type (ETYPE). The commandline option takes the numeric value and or symbolic type. Multiple values can be passed comma separated. Example -E ET_EXEC,ET_DYN,1
Here is the normal list available for your pleasure. You of course are free to specify any numeric value you want.
• 0 - ET_NONE - unknown type
You can also narrow your search by specifying the ELF bitsize. Again, specify the numeric value or the symbolic define.
• 32 - ELFCLASS32 - 32bit ELFs
A ! prefix will only show ELF's that do not have the specified section.
A ! prefix will only show ELF's that do not depend on the specified library.
m[blue]http://hardened.gentoo.org/pax-utils.xmlm[]
Please include as much information as possible (using any available debugging options) and send bug reports to the maintainers (see the AUTHORS section). Please use the Gentoo bugzilla at m[blue]http://bugs.gentoo.org/m[] if possible.
chpax(1), dumpelf(1), paxctl(1), pspax(1), readelf(1), scanelf(1), elf(5)
Ned Ludd <solar@gentoo.org>
Mike Frysinger <vapier@gentoo.org>
Fabian Groffen <grobian@gentoo.org>