[llvm-objcopy] Add support for --add-section for COFF
This patch enables support for --add-section=... option for COFF objects.
Differential Revision: https://reviews.llvm.org/D65040
llvm-svn: 367130
diff --git a/llvm/docs/CommandGuide/llvm-objcopy.rst b/llvm/docs/CommandGuide/llvm-objcopy.rst
index e113a82..64ba094 100644
--- a/llvm/docs/CommandGuide/llvm-objcopy.rst
+++ b/llvm/docs/CommandGuide/llvm-objcopy.rst
@@ -36,6 +36,13 @@
Add a .gnu_debuglink section for ``<debug-file>`` to the output.
+.. option:: --add-section <section=file>
+
+ Add a section named ``<section>`` with the contents of ``<file>`` to the
+ output. For ELF objects the section will be of type `SHT_NOTE`, if the name
+ starts with ".note". Otherwise, it will have type `SHT_PROGBITS`. Can be
+ specified multiple times to add multiple sections.
+
.. option:: --disable-deterministic-archives, -U
Use real values for UIDs, GIDs and timestamps when updating archive member
@@ -141,13 +148,6 @@
objects, :program:`llvm-objcopy` will either emit an error or silently ignore
them.
-.. option:: --add-section <section=file>
-
- Add a section named ``<section>`` with the contents of ``<file>`` to the
- output. The section will be of type `SHT_NOTE`, if the name starts with
- ".note". Otherwise, it will have type `SHT_PROGBITS`. Can be specified multiple
- times to add multiple sections.
-
.. option:: --add-symbol <name>=[<section>:]<value>[,<flags>]
Add a new symbol called ``<name>`` to the output symbol table, in the section