[@option{--prefix-alloc-sections=}@var{string}]
[@option{-v}|@option{--verbose}]
[@option{-V}|@option{--version}]
- [@option{--help}]
+ [@option{--help}] [@option{--info}]
@var{infile} [@var{outfile}]
@c man end
@end smallexample
@item --help
Show a summary of the options to @command{objcopy}.
+
+@item --info
+Display a list showing all architectures and object formats available.
@end table
@c man end
[@option{-x}|@option{--discard-all} ] [@option{-X} |@option{--discard-locals}]
[@option{-R} @var{sectionname} |@option{--remove-section=}@var{sectionname} ]
[@option{-o} @var{file} ] [@option{-p}|@option{--preserve-dates}]
- [@option{-v} |@option{--verbose}] [@option{-V}|@option{--version}] [@option{--help}]
+ [@option{-v} |@option{--verbose}] [@option{-V}|@option{--version}]
+ [@option{--help}] [@option{--info}]
@var{objfile}@dots{}
@c man end
@end smallexample
@item --help
Show a summary of the options to @command{strip} and exit.
+@item --info
+Display a list showing all architectures and object formats available.
+
@item -I @var{bfdname}
@itemx --input-target=@var{bfdname}
Treat the original @var{objfile} as a file with the object
#define OPTION_PREFIX_SYMBOLS (OPTION_ALT_MACH_CODE + 1)
#define OPTION_PREFIX_SECTIONS (OPTION_PREFIX_SYMBOLS + 1)
#define OPTION_PREFIX_ALLOC_SECTIONS (OPTION_PREFIX_SECTIONS + 1)
+#define OPTION_FORMATS_INFO (OPTION_PREFIX_ALLOC_SECTIONS + 1)
/* Options to handle if running as "strip". */
{"discard-locals", no_argument, 0, 'X'},
{"format", required_argument, 0, 'F'}, /* Obsolete */
{"help", no_argument, 0, 'h'},
+ {"info", no_argument, 0, OPTION_FORMATS_INFO},
{"input-format", required_argument, 0, 'I'}, /* Obsolete */
{"input-target", required_argument, 0, 'I'},
{"keep-symbol", required_argument, 0, 'K'},
{"format", required_argument, 0, 'F'}, /* Obsolete */
{"gap-fill", required_argument, 0, OPTION_GAP_FILL},
{"help", no_argument, 0, 'h'},
+ {"info", no_argument, 0, OPTION_FORMATS_INFO},
{"input-format", required_argument, 0, 'I'}, /* Obsolete */
{"input-target", required_argument, 0, 'I'},
{"interleave", required_argument, 0, 'i'},
-v --verbose List all object files modified\n\
-V --version Display this program's version number\n\
-h --help Display this output\n\
+ --info List object formats & architectures supported\n\
"));
list_supported_targets (program_name, stream);
if (exit_status == 0)
-v --verbose List all object files modified\n\
-V --version Display this program's version number\n\
-h --help Display this output\n\
+ --info List object formats & architectures supported\n\
-o <file> Place stripped output into <file>\n\
"));
int argc;
char *argv[];
{
- char *input_target = NULL, *output_target = NULL;
+ char *input_target = NULL;
+ char *output_target = NULL;
bfd_boolean show_version = FALSE;
- int c, i;
+ bfd_boolean formats_info = FALSE;
+ int c;
+ int i;
struct section_list *p;
char *output_file = NULL;
case 'V':
show_version = TRUE;
break;
+ case OPTION_FORMATS_INFO:
+ formats_info = TRUE;
+ break;
case 0:
/* We've been given a long option. */
break;
}
}
+ if (formats_info)
+ {
+ display_info ();
+ return 0;
+ }
+
if (show_version)
print_version ("strip");
char *argv[];
{
char * binary_architecture = NULL;
- char *input_filename = NULL, *output_filename = NULL;
- char *input_target = NULL, *output_target = NULL;
+ char *input_filename = NULL;
+ char *output_filename = NULL;
+ char *input_target = NULL;
+ char *output_target = NULL;
bfd_boolean show_version = FALSE;
bfd_boolean change_warn = TRUE;
+ bfd_boolean formats_info = FALSE;
int c;
struct section_list *p;
struct stat statbuf;
show_version = TRUE;
break;
+ case OPTION_FORMATS_INFO:
+ formats_info = TRUE;
+ break;
+
case OPTION_WEAKEN:
weaken = TRUE;
break;
}
}
+ if (formats_info)
+ {
+ display_info ();
+ return 0;
+ }
+
if (show_version)
print_version ("objcopy");
/* If there is no destination file then create a temp and rename
the result into the input. */
-
if (output_filename == (char *) NULL)
{
char *tmpname = make_tempname (input_filename);