aboutsummaryrefslogtreecommitdiff
path: root/binutils/strip.1
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-08-11 19:00:26 +0000
committerIan Lance Taylor <ian@airs.com>1994-08-11 19:00:26 +0000
commit0aca460e7c11225478d0ec4b962f204f0e91857a (patch)
treed3181494247ec6276e75ed86cae0403d077e42b0 /binutils/strip.1
parent97e7b66f5e80e55d1508778e9e037a4f9af8b9f6 (diff)
downloadgdb-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/strip.1')
-rw-r--r--binutils/strip.118
1 files changed, 15 insertions, 3 deletions
diff --git a/binutils/strip.1 b/binutils/strip.1
index 2854304..5373b9f 100644
--- a/binutils/strip.1
+++ b/binutils/strip.1
@@ -11,10 +11,14 @@
strip \- Discard symbols from object files.
.SH SYNOPSIS
+.hy 0
+.na
+.TP
.B strip
-.RB "[\|" "\-F \fIbfdname\fP" | \-\-target=\fIbfdname\fP "\|]"
-.RB "[\|" "\-I \fIbfdname\fP" | \-\-input\-target=\fIbfdname\fP "\|]"
-.RB "[\|" "\-O \fIbfdname\fP" | \-\-output\-target=\fIbfdname\fP "\|]"
+.RB "[\|" \-F \fIbfdname\fP\ |\ \-\-target=\fIbfdname\fP "\|]"
+.RB "[\|" \-I \fIbfdname\fP\ |\ \-\-input\-target=\fIbfdname\fP "\|]"
+.RB "[\|" \-O \fIbfdname\fP\ |\ \-\-output\-target=\fIbfdname\fP "\|]"
+.RB "[\|" \-R \fIsectionname\fP\ |\ \-\-remove\-section=\fIsectionname\fP "\|]"
.RB "[\|" \-s | \-\-strip\-all "\|]"
.RB "[\|" \-S | -g | \-\-strip\-debug "\|]"
.RB "[\|" \-x | \-\-discard\-all "\|]"
@@ -66,6 +70,14 @@ code format \fIbfdname\fP.
Replace \fIobjfile\fP with a file in the output format \fIbfdname\fP.
.TP
+.B "\-R \fIsectionname\fP"
+.TP
+.B "\-\-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
+object file unusable.
+
+.TP
.B \-s
.TP
.B \-\-strip\-all