* objcopy.c (copy_usage): Rename parameter to avoid shadowing.
(strip_usage): Likewise. * objcopy.c (struct section_add): Define. (add_sections): New static variable. (copy_options): Accept --add-section. (copy_usage): Mention --add-section. (copy_object): Add sections from the add_sections list. (copy_main): Handle --add-section. * binutils.texi, objcopy.1: Document --add-section.
This commit is contained in:
parent
6b045866c1
commit
d0130cc888
@ -753,6 +753,7 @@ objcopy [ -F @var{bfdname} | --target=@var{bfdname} ]
|
|||||||
[ --adjust-vma=@var{incr} ]
|
[ --adjust-vma=@var{incr} ]
|
||||||
[ --adjust-section-vma=@var{section}@{=,+,-@}@var{val} ]
|
[ --adjust-section-vma=@var{section}@{=,+,-@}@var{val} ]
|
||||||
[ --adjust-warnings ] [ --no-adjust-warnings ]
|
[ --adjust-warnings ] [ --no-adjust-warnings ]
|
||||||
|
[ --add-section=@var{sectionname}=@var{filename} ]
|
||||||
[ -v | --verbose ] [ -V | --version ] [ --help ]
|
[ -v | --verbose ] [ -V | --version ] [ --help ]
|
||||||
@var{infile} [@var{outfile}]
|
@var{infile} [@var{outfile}]
|
||||||
@end smallexample
|
@end smallexample
|
||||||
@ -896,6 +897,12 @@ exist, issue a warning. This is the default.
|
|||||||
Do not issue a warning if @samp{--adjust-section-vma} is used, even if
|
Do not issue a warning if @samp{--adjust-section-vma} is used, even if
|
||||||
the named section does not exist.
|
the named section does not exist.
|
||||||
|
|
||||||
|
@item --add-section @var{sectionname}=@var{filename}
|
||||||
|
Add a new section named @var{sectionname} while copying the file. The
|
||||||
|
contents of the new section are taken from the file @var{filename}. The
|
||||||
|
size of the section will be the size of the file. This option only
|
||||||
|
works on file formats which can support sections with arbitrary names.
|
||||||
|
|
||||||
@item -V
|
@item -V
|
||||||
@itemx --version
|
@itemx --version
|
||||||
Show the version number of @code{objcopy}.
|
Show the version number of @code{objcopy}.
|
||||||
|
@ -34,6 +34,7 @@ objcopy \- copy and translate object files
|
|||||||
.RB "[\|" \-\-adjust\-section\-vma=\fIsection{=,+,-}val\fR "\|]"
|
.RB "[\|" \-\-adjust\-section\-vma=\fIsection{=,+,-}val\fR "\|]"
|
||||||
.RB "[\|" \-\-adjust\-warnings\fR "\|]"
|
.RB "[\|" \-\-adjust\-warnings\fR "\|]"
|
||||||
.RB "[\|" \-\-no\-adjust\-warnings\fR "\|]"
|
.RB "[\|" \-\-no\-adjust\-warnings\fR "\|]"
|
||||||
|
.RB "[\|" \-\-add\-section=\fIsectionname=filename\fR "\|]"
|
||||||
.RB "[\|" \-v\ |\ \-\-verbose\fR "\|]"
|
.RB "[\|" \-v\ |\ \-\-verbose\fR "\|]"
|
||||||
.RB "[\|" \-V\ |\ \-\-version\fR "\|]"
|
.RB "[\|" \-V\ |\ \-\-version\fR "\|]"
|
||||||
.RB "[\|" \-\-help\fR "\|]"
|
.RB "[\|" \-\-help\fR "\|]"
|
||||||
@ -187,6 +188,13 @@ not exist, issue a warning. This is the default.
|
|||||||
Do not issue a warning if \fB\-\-adjust\-section\-vma\fP is used, even
|
Do not issue a warning if \fB\-\-adjust\-section\-vma\fP is used, even
|
||||||
if the named section does not exist.
|
if the named section does not exist.
|
||||||
.TP
|
.TP
|
||||||
|
.B \fB\-\-add\-section=\fIsectionname=filename
|
||||||
|
Add a new section named \fIsectionname\fR while copying the file. The
|
||||||
|
contents of the new section are taken from the file \fIfilename\fR.
|
||||||
|
The size of the section will be the size of the file. This option
|
||||||
|
only works on file formats which can support sections with arbitrary
|
||||||
|
names.
|
||||||
|
.TP
|
||||||
.B \-v\fR, \fB\-\-verbose
|
.B \-v\fR, \fB\-\-verbose
|
||||||
Verbose output: list all object files modified. In the case of
|
Verbose output: list all object files modified. In the case of
|
||||||
archives, "\fBobjcopy \-V\fR" lists all members of the archive.
|
archives, "\fBobjcopy \-V\fR" lists all members of the archive.
|
||||||
|
Loading…
Reference in New Issue
Block a user