From dd35de74344bc1dad410ed21fedd14671ab57aff Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 8 Jan 2010 18:50:39 +0000 Subject: Add --input-type and --output-type to elfedit binutils/ 2010-01-08 H.J. Lu * elfedit.c (input_elf_type): New. (output_elf_type): Likewise. (elf_type): Likewise. (update_elf_header): Support updating ELF file type. (command_line_switch): Add OPTION_INPUT_TYPE and OPTION_OUTPUT_TYPE. (options): Likewise. (usage): Add --input-type and --output-type. (main): Handle OPTION_INPUT_TYPE and OPTION_OUTPUT_TYPE. Check one of --output-mach and --output-type must be specified. * doc/binutils.texi: Document --input-type and --output-type for elfedit. binutils/testsuite/ 2010-01-08 H.J. Lu * binutils-all/elfedit-2.d: New. * binutils-all/elfedit.exp: Run elfedit-2. --- binutils/doc/binutils.texi | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'binutils/doc/binutils.texi') diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi index 4d9a23f..aedb80f 100644 --- a/binutils/doc/binutils.texi +++ b/binutils/doc/binutils.texi @@ -4107,7 +4107,9 @@ objdump(1), and the Info entries for @file{binutils}. @smallexample @c man begin SYNOPSIS elfedit elfedit [@option{--input-mach=}@var{machine}] + [@option{--input-type=}@var{type}] @option{--output-mach=}@var{machine} + @option{--output-type=}@var{type} [@option{-v}|@option{--version}] [@option{-h}|@option{--help}] @var{elffile}@dots{} @@ -4116,9 +4118,9 @@ elfedit [@option{--input-mach=}@var{machine}] @c man begin DESCRIPTION elfedit -@command{elfedit} updates the ELF header of ELF files. The -options control how and which fields in the ELF header should be -updated. +@command{elfedit} updates the ELF header of ELF files which have +the matching ELF machine and file types. The options control how and +which fields in the ELF header should be updated. @var{elffile}@dots{} are the ELF files to be updated. 32-bit and 64-bit ELF files are supported, as are archives containing ELF files. @@ -4127,14 +4129,15 @@ updated. @c man begin OPTIONS elfedit The long and short forms of options, shown here as alternatives, are -equivalent. The @option{--output-mach} option must be given. +equivalent. At least one of the @option{--output-mach} and +@option{--output-type} options must be given. @table @env @itemx --input-mach=@var{machine} -Only the input files with ELF machine type, @var{machine}, will be -updated. If @option{--input-mach} isn't specified, any ELF file -will be updated. +Set the matching input ELF machine type to @var{machine}. If +@option{--input-mach} isn't specified, it will match any ELF +machine types. The supported ELF machine types are, @var{L1OM} and @var{x86-64}. @@ -4142,6 +4145,16 @@ The supported ELF machine types are, @var{L1OM} and @var{x86-64}. Change the ELF machine type in the ELF header to @var{machine}. The supported ELF machine types are the same as @option{--input-mach}. +@itemx --input-type=@var{type} +Set the matching input ELF file type to @var{type}. If +@option{--input-type} isn't specified, it will match any ELF file types. + +The supported ELF file types are, @var{rel}, @var{exec} and @var{dyn}. + +@itemx --output-type=@var{type} +Change the ELF file type in the ELF header to @var{type}. The +supported ELF types are the same as @option{--input-type}. + @item -v @itemx --version Display the version number of @command{elfedit}. -- cgit v1.1