mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 23:39:35 +08:00
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:
@ -1,3 +1,15 @@
|
|||||||
|
Thu Aug 11 14:55:57 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
Wed Aug 10 10:19:55 1994 Stan Shebs (shebs@andros.cygnus.com)
|
Wed Aug 10 10:19:55 1994 Stan Shebs (shebs@andros.cygnus.com)
|
||||||
|
|
||||||
* nlmconv.c (powerpc_mangle_relocs): Rename symvalue to sym_value,
|
* nlmconv.c (powerpc_mangle_relocs): Rename symvalue to sym_value,
|
||||||
|
@ -741,6 +741,7 @@ objcopy [ -F @var{bfdname} | --target=@var{bfdname} ]
|
|||||||
[ -x | --discard-all ] [ -X | --discard-locals ]
|
[ -x | --discard-all ] [ -X | --discard-locals ]
|
||||||
[ -b @var{byte} | --byte=@var{byte} ]
|
[ -b @var{byte} | --byte=@var{byte} ]
|
||||||
[ -i @var{interleave} | --interleave=@var{interleave} ]
|
[ -i @var{interleave} | --interleave=@var{interleave} ]
|
||||||
|
[ -R @var{sectionname} | --remove-section=@var{sectionname} ]
|
||||||
[ -v | --verbose ] [ -V | --version ] [ --help ]
|
[ -v | --verbose ] [ -V | --version ] [ --help ]
|
||||||
@var{infile} [@var{outfile}]
|
@var{infile} [@var{outfile}]
|
||||||
@end smallexample
|
@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
|
file; i.e., simply transfer data from source to destination with no
|
||||||
translation. @xref{Target Selection}, for more information.
|
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
|
@item -S
|
||||||
@itemx --strip-all
|
@itemx --strip-all
|
||||||
Do not copy relocation and symbol information from the source file.
|
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} ]
|
[ -O @var{bfdname} | --output-target=@var{bfdname} ]
|
||||||
[ -s | --strip-all ] [ -S | -g | --strip-debug ]
|
[ -s | --strip-all ] [ -S | -g | --strip-debug ]
|
||||||
[ -x | --discard-all ] [ -X | --discard-locals ]
|
[ -x | --discard-all ] [ -X | --discard-locals ]
|
||||||
|
[ -R @var{sectionname} | --remove-section=@var{sectionname} ]
|
||||||
[ -v | --verbose ] [ -V | --version ] [ --help ]
|
[ -v | --verbose ] [ -V | --version ] [ --help ]
|
||||||
@var{objfile}@dots{}
|
@var{objfile}@dots{}
|
||||||
@end smallexample
|
@end smallexample
|
||||||
@ -1240,6 +1248,12 @@ code format @var{bfdname}.
|
|||||||
Replace @var{objfile} with a file in the output format @var{bfdname}.
|
Replace @var{objfile} with a file in the output format @var{bfdname}.
|
||||||
@xref{Target Selection}, for more information.
|
@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
|
@item -s
|
||||||
@itemx --strip-all
|
@itemx --strip-all
|
||||||
Remove all symbols.
|
Remove all symbols.
|
||||||
|
@ -18,6 +18,7 @@ objcopy \- copy and translate object files
|
|||||||
.RB "[\|" \-F\ \fIbfdname\fB\ |\ \-\-target=\fIbfdname\fR "\|]"
|
.RB "[\|" \-F\ \fIbfdname\fB\ |\ \-\-target=\fIbfdname\fR "\|]"
|
||||||
.RB "[\|" \-I\ \fIbfdname\fB\ |\ \-\-input\-target=\fIbfdname\fR "\|]"
|
.RB "[\|" \-I\ \fIbfdname\fB\ |\ \-\-input\-target=\fIbfdname\fR "\|]"
|
||||||
.RB "[\|" \-O\ \fIbfdname\fB\ |\ \-\-output\-target=\fIbfdname\fR "\|]"
|
.RB "[\|" \-O\ \fIbfdname\fB\ |\ \-\-output\-target=\fIbfdname\fR "\|]"
|
||||||
|
.RB "[\|" \-R\ \fIsectionname\fB\ |\ \-\-remove\-section=\fIsectionname\fR "\|]"
|
||||||
.RB "[\|" \-S\ |\ \-\-strip\-all\fR "\|]"
|
.RB "[\|" \-S\ |\ \-\-strip\-all\fR "\|]"
|
||||||
.RB "[\|" \-g\ |\ \-\-strip\-debug\fR "\|]"
|
.RB "[\|" \-g\ |\ \-\-strip\-debug\fR "\|]"
|
||||||
.RB "[\|" \-x\ |\ \-\-discard\-all\fR "\|]"
|
.RB "[\|" \-x\ |\ \-\-discard\-all\fR "\|]"
|
||||||
@ -74,6 +75,11 @@ Use
|
|||||||
as the object format for both the input and the output file; i.e.
|
as the object format for both the input and the output file; i.e.
|
||||||
simply transfer data from source to destination with no translation.
|
simply transfer data from source to destination with no translation.
|
||||||
.TP
|
.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
|
||||||
|
output file unusable.
|
||||||
|
.TP
|
||||||
.B \-S\fR, \fB\-\-strip\-all
|
.B \-S\fR, \fB\-\-strip\-all
|
||||||
Do not copy relocation and symbol information from the source file.
|
Do not copy relocation and symbol information from the source file.
|
||||||
.TP
|
.TP
|
||||||
|
@ -11,10 +11,14 @@
|
|||||||
strip \- Discard symbols from object files.
|
strip \- Discard symbols from object files.
|
||||||
|
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
.hy 0
|
||||||
|
.na
|
||||||
|
.TP
|
||||||
.B strip
|
.B strip
|
||||||
.RB "[\|" "\-F \fIbfdname\fP" | \-\-target=\fIbfdname\fP "\|]"
|
.RB "[\|" \-F \fIbfdname\fP\ |\ \-\-target=\fIbfdname\fP "\|]"
|
||||||
.RB "[\|" "\-I \fIbfdname\fP" | \-\-input\-target=\fIbfdname\fP "\|]"
|
.RB "[\|" \-I \fIbfdname\fP\ |\ \-\-input\-target=\fIbfdname\fP "\|]"
|
||||||
.RB "[\|" "\-O \fIbfdname\fP" | \-\-output\-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 | \-\-strip\-all "\|]"
|
||||||
.RB "[\|" \-S | -g | \-\-strip\-debug "\|]"
|
.RB "[\|" \-S | -g | \-\-strip\-debug "\|]"
|
||||||
.RB "[\|" \-x | \-\-discard\-all "\|]"
|
.RB "[\|" \-x | \-\-discard\-all "\|]"
|
||||||
@ -65,6 +69,14 @@ code format \fIbfdname\fP.
|
|||||||
.B "\-\-output\-target=\fIbfdname"
|
.B "\-\-output\-target=\fIbfdname"
|
||||||
Replace \fIobjfile\fP with a file in the output 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
|
.TP
|
||||||
.B \-s
|
.B \-s
|
||||||
.TP
|
.TP
|
||||||
|
Reference in New Issue
Block a user