| 1 | /* |
1 | /* |
| 2 | * Copyright 2003 Ned Ludd <solar@gentoo.org> |
2 | * Copyright 2003 Ned Ludd <solar@gentoo.org> |
| 3 | * Copyright 1999-2005 Gentoo Foundation |
3 | * Copyright 1999-2005 Gentoo Foundation |
| 4 | * Distributed under the terms of the GNU General Public License v2 |
4 | * Distributed under the terms of the GNU General Public License v2 |
| 5 | * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.45 2005/05/14 00:18:56 solar Exp $ |
5 | * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.46 2005/05/16 21:59:06 vapier Exp $ |
| 6 | * |
6 | * |
| 7 | ******************************************************************** |
7 | ******************************************************************** |
| 8 | * This program is free software; you can redistribute it and/or |
8 | * This program is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU General Public License as |
9 | * modify it under the terms of the GNU General Public License as |
| 10 | * published by the Free Software Foundation; either version 2 of the |
10 | * published by the Free Software Foundation; either version 2 of the |
| … | |
… | |
| 33 | #include <getopt.h> |
33 | #include <getopt.h> |
| 34 | #include <assert.h> |
34 | #include <assert.h> |
| 35 | |
35 | |
| 36 | #include "paxelf.h" |
36 | #include "paxelf.h" |
| 37 | |
37 | |
| 38 | static const char *rcsid = "$Id: scanelf.c,v 1.45 2005/05/14 00:18:56 solar Exp $"; |
38 | static const char *rcsid = "$Id: scanelf.c,v 1.46 2005/05/16 21:59:06 vapier Exp $"; |
| 39 | #define argv0 "scanelf" |
39 | #define argv0 "scanelf" |
| 40 | |
40 | |
| 41 | |
41 | |
| 42 | |
42 | |
| 43 | /* prototypes */ |
43 | /* prototypes */ |
| … | |
… | |
| 602 | "Print TEXTREL information", |
602 | "Print TEXTREL information", |
| 603 | "Print RPATH information", |
603 | "Print RPATH information", |
| 604 | "Print NEEDED information", |
604 | "Print NEEDED information", |
| 605 | "Print INTERP information", |
605 | "Print INTERP information", |
| 606 | "Find a specified symbol", |
606 | "Find a specified symbol", |
| 607 | "Print all scanned info (-x -e -t -r)\n", |
607 | "Print all scanned info (-x -e -t -r -n -i)\n", |
| 608 | "Only output 'bad' things", |
608 | "Only output 'bad' things", |
| 609 | "Be verbose (can be specified more than once)", |
609 | "Be verbose (can be specified more than once)", |
| 610 | "Use specified format for output", |
610 | "Use specified format for output", |
| 611 | "Read input stream from a filename", |
611 | "Read input stream from a filename", |
| 612 | "Write output stream to a filename", |
612 | "Write output stream to a filename", |
| … | |
… | |
| 632 | long_opts[i].name, opts_help[i]); |
632 | long_opts[i].name, opts_help[i]); |
| 633 | |
633 | |
| 634 | if (status != EXIT_SUCCESS) |
634 | if (status != EXIT_SUCCESS) |
| 635 | exit(status); |
635 | exit(status); |
| 636 | |
636 | |
| 637 | puts("\nThe format modifiers for the -F option are"); |
637 | puts("\nThe format modifiers for the -F option are:"); |
| 638 | puts(" %F Filename"); |
638 | puts(" %F Filename \t%x PaX Flags \t%e STACK/RELRO"); |
| 639 | puts(" %x PaX Flags"); |
639 | puts(" %t TEXTREL \t%r RPATH \t%n NEEDED"); |
| 640 | puts(" %e STACK/RELRO"); |
640 | puts(" %i INTERP \t%s symbol"); |
| 641 | puts(" %t TEXTREL"); |
|
|
| 642 | puts(" %r RPATH"); |
|
|
| 643 | puts(" %n NEEDED"); |
|
|
| 644 | puts(" %i INTERP"); |
|
|
| 645 | puts(" %s symbol"); |
|
|
| 646 | |
641 | |
| 647 | exit(status); |
642 | exit(status); |
| 648 | } |
643 | } |
| 649 | |
644 | |
| 650 | /* parse command line arguments and preform needed actions */ |
645 | /* parse command line arguments and preform needed actions */ |