aboutsummaryrefslogtreecommitdiff
path: root/binutils/binutils.texi
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1999-06-12 15:42:04 +0000
committerIan Lance Taylor <ian@airs.com>1999-06-12 15:42:04 +0000
commitf91ea8497661e80927b17cabda43af803e60391c (patch)
treeb568bebd345c04df219493bd41412a2b8ee46d18 /binutils/binutils.texi
parentf353eb8a51a81b3997cf97a7e02c5a7fdafb8a6e (diff)
downloadgdb-f91ea8497661e80927b17cabda43af803e60391c.zip
gdb-f91ea8497661e80927b17cabda43af803e60391c.tar.gz
gdb-f91ea8497661e80927b17cabda43af803e60391c.tar.bz2
Based on patch from H. Peter Anvin <hpa@transmeta.com>:
* objcopy.c (struct section_list): Add copy field. (sections_copied): New static variable. (copy_options): Add "only-section". (copy_usage): Mention -j and --only-section. (find_section_list): Initialize copy field. (is_strip_section): Check for copying sections. (copy_object): Check sections_copied when calling filter_symbols. (setup_section): Check for copying sections. (copy_section): Likewise. (copy_main): Handle -j/--only-section. * binutils.texi, objcopy.1: Document -j/--only-section.
Diffstat (limited to 'binutils/binutils.texi')
-rw-r--r--binutils/binutils.texi7
1 files changed, 7 insertions, 0 deletions
diff --git a/binutils/binutils.texi b/binutils/binutils.texi
index b431a95..a079d92 100644
--- a/binutils/binutils.texi
+++ b/binutils/binutils.texi
@@ -837,6 +837,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} ]
+ [ -j @var{sectionname} | --only-section=@var{sectionname} ]
[ -R @var{sectionname} | --remove-section=@var{sectionname} ]
[ -p | --preserve-dates ] [ --debugging ]
[ --gap-fill=@var{val} ] [ --pad-to=@var{address} ]
@@ -905,6 +906,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 -j @var{sectionname}
+@itemx --only-section=@var{sectionname}
+Copy only the named section from the input file to the output file.
+This option may be given more than once. Note that using this option
+inappropriately may make the output file unusable.
+
@item -R @var{sectionname}
@itemx --remove-section=@var{sectionname}
Remove any section named @var{sectionname} from the output file. This