diff options
author | Ian Lance Taylor <ian@airs.com> | 1994-08-11 19:00:26 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1994-08-11 19:00:26 +0000 |
commit | 0aca460e7c11225478d0ec4b962f204f0e91857a (patch) | |
tree | d3181494247ec6276e75ed86cae0403d077e42b0 /binutils/binutils.texi | |
parent | 97e7b66f5e80e55d1508778e9e037a4f9af8b9f6 (diff) | |
download | gdb-0aca460e7c11225478d0ec4b962f204f0e91857a.zip gdb-0aca460e7c11225478d0ec4b962f204f0e91857a.tar.gz gdb-0aca460e7c11225478d0ec4b962f204f0e91857a.tar.bz2 |
Add support for removing named sections to objcopy and strip.
* objcopy.c (struct section_list): Define.
(remove_sections): New static variable.
(strip_options, copy_options): Add remove-section.
(copy_usage, strip_usage): Mention -R and --remove-section.
(setup_section): If section is in remove_sections list, ignore it.
(copy_section): Likewise.
(strip_main, copy_main): Handle -R.
* binutils.texi, objcopy.1, strip.1: Document new options.
Diffstat (limited to 'binutils/binutils.texi')
-rw-r--r-- | binutils/binutils.texi | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/binutils/binutils.texi b/binutils/binutils.texi index 77f2e2f..aeb67fb 100644 --- a/binutils/binutils.texi +++ b/binutils/binutils.texi @@ -741,6 +741,7 @@ objcopy [ -F @var{bfdname} | --target=@var{bfdname} ] [ -x | --discard-all ] [ -X | --discard-locals ] [ -b @var{byte} | --byte=@var{byte} ] [ -i @var{interleave} | --interleave=@var{interleave} ] + [ -R @var{sectionname} | --remove-section=@var{sectionname} ] [ -v | --verbose ] [ -V | --version ] [ --help ] @var{infile} [@var{outfile}] @end smallexample @@ -781,6 +782,12 @@ Use @var{bfdname} as the object format for both the input and the output file; i.e., simply transfer data from source to destination with no translation. @xref{Target Selection}, for more information. +@item -R @var{sectionname} +@itemx --remove-section=@var{sectionname} +Remove any section named @var{sectionname} from the output file. This +option may be given more than once. Note that using this option +inappropriately may make the output file unusable. + @item -S @itemx --strip-all Do not copy relocation and symbol information from the source file. @@ -1208,6 +1215,7 @@ strip [ -F @var{bfdname} | --target=@var{bfdname} | --target=@var{bfdname} ] [ -O @var{bfdname} | --output-target=@var{bfdname} ] [ -s | --strip-all ] [ -S | -g | --strip-debug ] [ -x | --discard-all ] [ -X | --discard-locals ] + [ -R @var{sectionname} | --remove-section=@var{sectionname} ] [ -v | --verbose ] [ -V | --version ] [ --help ] @var{objfile}@dots{} @end smallexample @@ -1240,6 +1248,12 @@ code format @var{bfdname}. Replace @var{objfile} with a file in the output format @var{bfdname}. @xref{Target Selection}, for more information. +@item -R @var{sectionname} +@itemx --remove-section=@var{sectionname} +Remove any section named @var{sectionname} from the output file. This +option may be given more than once. Note that using this option +inappropriately may make the output file unusable. + @item -s @itemx --strip-all Remove all symbols. |