.TH "scanelf" "1" "Dec 2006" "Ned Ludd, Mike Frysinger" "User Commands" .SH "NAME" .LP scanelf \- user-space utility to scan elf files .SH "SYNTAX" .LP scanelf [\fIoptions\fP] dir1 dir2 dirN... .BR .SH "DESCRIPTION" scanelf is a user-space utility to scan and list ELF types, as well as thier respctive PaX flags and filenames. .LP .SH "OPTIONS" .LP .TP \fB\-p, \-\-path\fR Scan all directories in PATH environment .TP \fB\-A, \-\-archives\fR Scan archives (.a files) .TP \fB\-l, \-\-ldpath\fR Scan all directories in /etc/ld.so.conf .TP \fB\-R, \-\-recursive\fR Scan directories recursively .TP \fB\-m, \-\-mount\fR Don't recursively cross mount points .TP \fB\-y, \-\-symlink\fR Don't scan symlinks .TP \fB\-X, \-\-fix\fR Try and 'fix' bad things (use with -r/-e) .TP \fB\-z, \-\-setpax\fR Sets EI_PAX/PT_PAX_FLAGS to (use with -Xx) .TP \fB\-x, \-\-pax\fR Print PaX markings .TP \fB\-L, \-\-ldcache\fR Utilize ld.so.cache information (use with -r/-n) .TP \fB\-e, \-\-header\fR Print GNU_STACK markings .TP \fB\-t, \-\-textrel\fR Print TEXTREL information .TP \fB\-r, \-\-rpath\fR Print RPATH information .TP \fB\-n, \-\-needed\fR Print NEEDED information .TP \fB\-i, \-\-interp\fR Print INTERP information .TP \fB\-b, \-\-bind\fR Print BIND information .TP \fB\-S, \-\-soname\fR Print SONAME information .TP \fB\-s, \-\-symbol \fR Find a specified symbol .TP \fB\-k, \-\-section \fR Find a specified section .TP \fB\-N, \-\-lib \fR Find a specified library .TP \fB\-g, \-\-gmatch\fR Use strncmp to match libraries. (use with \-N) .TP \fB\-T, \-\-textrels \fR Find a specified symbol Locate cause of TEXTREL .TP \fB\-E, \-\-etype \fR Print only ELF files matching etype ET_DYN,ET_EXEC ... .TP \fB\-M, \-\-bits \fR Print only ELF files matching numeric bits .TP \fB\-a, \-\-all\fR Print all scanned info (-x -e -t -r -n -i -b) .TP \fB\-q, \-\-quiet\fR Only output 'bad' things. .TP \fB\-v, \-\-verbose\fR Be verbose (can be specified more than once) .TP \fB\-F, \-\-format \fR The format modifiers mainly correspond to the getopt counterparts. This option implies -a internally. Use specified format for output. \fB%F\fR FILENAME \fB%x\fR PaX-Flags \fB%e\fR STACK/RELRO/LOAD \fB%t\fR TEXTREL \fB%r\fR RPATH \fB%b\fR BINDINGS \fB%n\fR NEEDED \fB%i\fR INTERP \fB%s\fR symbol \fB%k\fR section \fB%a\fR arch \fB%N\fR library \fB%T\fR TEXTRELs \fB%o\fR Elf Type \fB%p\fR filename (with search path removed) \fB%f\fR base filename .TP Prefix each modifier with '%' (verbose) or '#' (silent) .TP \fB\-f, \-\-from \fR Read input stream from a filename .TP \fB\-o, \-\-file \fR Write output stream to a filename .TP \fB\-B, \-\-nobanner\fR Don't display the header .TP \fB\-h, \-\-help\fR Print this help and exit .TP \fB\-V, \-\-version\fR Print version and exit .TP .BR .SH "FILES" .LP \fI/etc/ld.so.conf\fP .SH "ENVIRONMENT VARIABLES" .TP \fBPATH\fP When the -p option is used the environment variable PATH will be used. .SH "EXAMPLES" .LP To run this program the standard way type: .LP scanelf -p # Would print everything in your normal PATH. .TP scanelf -l -p -a -R # Would print everything in library path and PATHs recursively. .LP scanelf -ltq # Would search every elf in your library paths for quality assurance problems with text relocations. use -p on native pie systems. .TP Alternativly you can run it like: .LP scanelf /bin /usr/bin /lib /sbin/insmod .SH "HOMEPAGE" http://hardened.gentoo.org/pax-utils.xml .LP .SH "REPORTING BUGS" Please include as much information as possible (using any available debugging options) and send bug reports to pax-utils or .SH "SEE ALSO" .BR chpax (1), .BR paxctl (1), .BR pspax (1), .BR dumpelf (1), .BR readelf (1), .SH "AUTHORS" scanelf was written by and