forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -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 "\|]"
|
||||
@@ -65,6 +69,14 @@ code format \fIbfdname\fP.
|
||||
.B "\-\-output\-target=\fIbfdname"
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user