SYNOPSIS
scanelf [options] ELFs or directories
DESCRIPTION
scanelf is a user-space utility to quickly scan given ELFs,
directories, or common system paths for different information. This may
include ELF types, their PaX markings, TEXTRELs, etc...
OPTIONS
-A, --archives
Scan archives (.a files)
-a, --all
Print all scanned info (-x -e -t -r -n -i -b)
-B, --banner
Don't display the header
-b, --bind
Print BIND information
-E, --etype ETYPE
Print only ELF files matching specified etype (like ET_DYN,
ET_EXEC, etc...)
-e, --header
Print GNU_STACK markings
-F, --format FORMAT
Use specified format for output; see the FORMAT section
-f, --from FILE
Read input stream from specified filename
-g, --gmatch
Use strncmp to match libraries (use with -N). Or regexp with symbol
matching
-h, --help
Show condensed usage and exit
-i, --interp
Print INTERP information
-k, --section SECTION
Find the specified section
-L, --ldcache
Utilize ld.so.cache information (use with -r/-n)
-l, --ldpath
Scan all directories in /etc/ld.so.conf
-N, --lib SONAME
Find ELFs that need the specified SONAME
-n, --needed
Print NEEDED information
-o, --file FILE
Write output stream to specified filename
-p, --path
Scan all directories in PATH environment
-q, --quiet
Only output 'bad' things.
-R, --recursive
Scan directories recursively
-r, --rpath
Print RUNPATH information
-S, --soname
Print SONAME information
-s, --symbol SYMBOL
Find the specified symbol; a - prefix will only show undefined
references while a + prefix will only show defined references while
no prefix will show both
-T, --textrels
Locate cause of TEXTRELs
-t, --textrel
Print TEXTREL information
-V, --version
Print version and exit
-v, --verbose
Be verbose (can be used more than once)
-X, --fix
Try and 'fix' bad things (use with -r/-e)
-x, --pax
Print PaX markings
-y, --symlink
Don't scan symlinks
-z, --setpax FLAGS
Sets EI_PAX/PT_PAX_FLAGS to specified flags (use with -Xx)
FORMAT
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. o % -
replace with info .sp -1 .TP 4 o # - silent boolean match .sp -1 .TP 4
o + - verbose match
And there are a number of conversion specifiers. We try to match up the
specifier with corresponding option. o a - machine (EM) type .sp -1
.TP 4 o b - bind flags .sp -1 .TP 4 o e - program headers .sp -1 .TP 4
o D - endian .sp -1 .TP 4 o F - long filename .sp -1 .TP 4 o f - short
filename .sp -1 .TP 4 o i - interp .sp -1 .TP 4 o k - section .sp -1
.TP 4 o M - EI class .sp -1 .TP 4 o N - specified needed .sp -1 .TP 4 o
n - needed libraries .sp -1 .TP 4 o p - filename (minus search) .sp -1
.TP 4 o o - etype .sp -1 .TP 4 o O - perms .sp -1 .TP 4 o r - runpaths
.sp -1 .TP 4 o S - SONAME .sp -1 .TP 4 o s - symbol .sp -1 .TP 4 o T -
all textrels .sp -1 .TP 4 o t - textrel status .sp -1 .TP 4 o x - pax
flags
ELF ETYPES
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. o 0 - ET_NONE - unknown
type .sp -1 .TP 4 o 1 - ET_REL - relocatable file .sp -1 .TP 4 o 2 -
ET_EXEC - executable file .sp -1 .TP 4 o 3 - ET_DYN - shared object .sp
-1 .TP 4 o 4 - ET_CORE - core file
ELF BITS
You can also narrow your search by specifying the ELF bitsize. Again,
specify the numeric value or the symbolic define. o 32 - ELFCLASS32 -
32bit ELFs .sp -1 .TP 4 o 64 - ELFCLASS64 - 64bit ELFs
HOMEPAGE
http://hardened.gentoo.org/pax-utils.xml
REPORTING BUGS
Please include as much information as possible (using any available
debugging options) and send bug reports to the maintainers (see the
AUTHORS section).
SEE ALSO
chpax(1), dumpelf(1), paxctl(1), pspax(1), readelf(1), scanelf(1)
AUTHORS
|