diff options
author | Ian Lance Taylor <ian@airs.com> | 1999-06-12 15:42:04 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1999-06-12 15:42:04 +0000 |
commit | f91ea8497661e80927b17cabda43af803e60391c (patch) | |
tree | b568bebd345c04df219493bd41412a2b8ee46d18 /binutils/objcopy.1 | |
parent | f353eb8a51a81b3997cf97a7e02c5a7fdafb8a6e (diff) | |
download | gdb-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/objcopy.1')
-rw-r--r-- | binutils/objcopy.1 | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/binutils/objcopy.1 b/binutils/objcopy.1 index aee7760..68b98d3 100644 --- a/binutils/objcopy.1 +++ b/binutils/objcopy.1 @@ -1,4 +1,4 @@ -.\" Copyright (c) 1991, 93, 94, 95, 96, 97, 1998 Free Software Foundation +.\" Copyright (c) 1991, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation .\" See section COPYING for conditions for redistribution .TH objcopy 1 "October 1994" "cygnus support" "GNU Development Tools" .de BP @@ -18,6 +18,7 @@ objcopy \- copy and translate object files .RB "[\|" \-F\ \fIbfdname\fR\ |\ \fB\-\-target=\fIbfdname\fR "\|]" .RB "[\|" \-I\ \fIbfdname\fR\ |\ \fB\-\-input\-target=\fIbfdname\fR "\|]" .RB "[\|" \-O\ \fIbfdname\fR\ |\ \fB\-\-output\-target=\fIbfdname\fR "\|]" +.RB "[\|" \-j\ \fIsectionname\fR\ |\ \fB\-\-only\-section=\fIsectionname\fR "\|]" .RB "[\|" \-R\ \fIsectionname\fR\ |\ \fB\-\-remove\-section=\fIsectionname\fR "\|]" .RB "[\|" \-S\fR\ |\ \fB\-\-strip\-all\fR "\|]" .RB "[\|" \-g\fR\ |\ \fB\-\-strip\-debug\fR "\|]" @@ -123,6 +124,12 @@ Use as the object format for both the input and the output file; i.e. simply transfer data from source to destination with no translation. .TP +.B \-j \fIsectionname\fR, \fB\-\-only\-section=\fIsectionname +Copy only the named section from the input file to the output file, +discarding all other sections. This option may be given more than +once. Note that using this option inappropriately may make the output +file unusable. +.TP .B \-R \fIsectionname\fR, \fB\-\-remove-section=\fIsectionname Remove the named section from the file. This option may be given more than once. Note that using this option inappropriately may make the @@ -301,7 +308,7 @@ The GNU Binary Utilities\c \&, Roland H. Pesch (June 1993). .SH COPYING -Copyright (c) 1993, 94, 95, 96, 1997 Free Software Foundation, Inc. +Copyright (c) 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. .PP Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice |