aboutsummaryrefslogtreecommitdiff
path: root/binutils/doc
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2013-12-31 09:52:24 +0000
committerNick Clifton <nickc@redhat.com>2013-12-31 09:52:24 +0000
commitbbad633bb88cf35a8865a07b80609b57d2f29bdd (patch)
tree3593707e855b8dee8eceff6299805d66b814a7ee /binutils/doc
parent402333465480bd9a4e87091757f4649ae8835eca (diff)
downloadgdb-bbad633bb88cf35a8865a07b80609b57d2f29bdd.zip
gdb-bbad633bb88cf35a8865a07b80609b57d2f29bdd.tar.gz
gdb-bbad633bb88cf35a8865a07b80609b57d2f29bdd.tar.bz2
* objcopy.c (dump_sections): New list.
(command_line_switch): Add OPTION_DUMP_SECTION. (copy_options): Add dump-section. (copy_usage): Document new option. (copy_object): Dump requested sections. (copy_main): Handle --dump-section. * doc/binutils.texi: Document --dump-section option. * NEWS: Mention new feature.
Diffstat (limited to 'binutils/doc')
-rw-r--r--binutils/doc/binutils.texi12
1 files changed, 12 insertions, 0 deletions
diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi
index 6abcae2..39aa077 100644
--- a/binutils/doc/binutils.texi
+++ b/binutils/doc/binutils.texi
@@ -1089,6 +1089,7 @@ objcopy [@option{-F} @var{bfdname}|@option{--target=}@var{bfdname}]
[@option{--change-warnings}] [@option{--no-change-warnings}]
[@option{--set-section-flags} @var{sectionpattern}=@var{flags}]
[@option{--add-section} @var{sectionname}=@var{filename}]
+ [@option{--dump-section} @var{sectionname}=@var{filename}]
[@option{--rename-section} @var{oldname}=@var{newname}[,@var{flags}]]
[@option{--long-section-names} @{enable,disable,keep@}]
[@option{--change-leading-char}] [@option{--remove-leading-char}]
@@ -1475,6 +1476,17 @@ 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.
+Note - it may be necessary to use the @option{--set-section-flags}
+option to set the attributes of the newly created section.
+
+@item --dump-section @var{sectionname}=@var{filename}
+Place the contents of section named @var{sectionname} into the file
+@var{filename}, overwriting any contents that may have been there
+previously. This option is the inverse of @option{--add-section}.
+This option is similar to the @option{--only-section} option except
+that it does not create a formatted file, it just dumps the contents
+as raw binary data, without applying any relocations. The option can
+be specified more than once.
@item --rename-section @var{oldname}=@var{newname}[,@var{flags}]
Rename a section from @var{oldname} to @var{newname}, optionally