mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 01:50:48 +00:00
* objcopy.c (struct section_list): Add fields remove, set_flags,
and flags. Change adjust from boolean to enum. (remove_sections): Remove static variable. (sections_removed): New static variable. (copy_options): Add --set-section-flags. (copy_usage): Mention --set-section-flags. (parse_flags): New static function. (find_section_list): New static function. (is_strip_symbol): Change return type from int to boolean. (is_strip_section): New static function. (filter_symbols): Call is_strip_section. (copy_object): When adding sections, check for specified flags or VMA. Call filter_symbols if any sections are being removed. (setup_section): Use find_section_list function rather than looking through remove_sections and adjust_sections. Handle --set-section-flags. (copy_section): Use find_section_list rather than looking through remove_sections. (strip_main): Use find_section_list instead of adding items to sections_removed. (copy_main): Use find_section_list instead of adding items to sections_removed and adjust_sections. Handle --set-section-flags. * binutils.texi, objcopy.1: Document --set-section-flags.
This commit is contained in:
@@ -34,6 +34,7 @@ objcopy \- copy and translate object files
|
||||
.RB "[\|" \-\-adjust\-section\-vma=\fIsection{=,+,-}val\fR "\|]"
|
||||
.RB "[\|" \-\-adjust\-warnings\fR "\|]"
|
||||
.RB "[\|" \-\-no\-adjust\-warnings\fR "\|]"
|
||||
.RB "[\|" \-\-set\-section\-flags=\fIsection=flags\fR "\|]"
|
||||
.RB "[\|" \-\-add\-section=\fIsectionname=filename\fR "\|]"
|
||||
.RB "[\|" \-v\ |\ \-\-verbose\fR "\|]"
|
||||
.RB "[\|" \-V\ |\ \-\-version\fR "\|]"
|
||||
@@ -188,6 +189,13 @@ not exist, issue a warning. This is the default.
|
||||
Do not issue a warning if \fB\-\-adjust\-section\-vma\fP is used, even
|
||||
if the named section does not exist.
|
||||
.TP
|
||||
.B \fB\-\-set\-section\-flags=\fIsection=flags
|
||||
Set the flags for the named section. The \fIflags\fP argument is a
|
||||
comma separated string of flag names. The recognized names are
|
||||
\fIalloc\fP, \fIload\fP, \fIreadonly\fP, \fIcode\fP, \fIdata\fP, and
|
||||
\fIrom\fP. Not all flags are meaningful for all object file
|
||||
formats.
|
||||
.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.
|
||||
|
||||
Reference in New Issue
Block a user