[PATCH] D64245: [docs][llvm-objcopy] Add description of binary input/output to doc

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 5 05:46:11 PDT 2019


jhenderson created this revision.
jhenderson added reviewers: jakehehrlich, rupprecht, MaskRay, abrachet.
Herald added a reviewer: alexshap.
Herald added a project: LLVM.

We briefly referred to being able to specify --target=binary without explaining what binary input/output meant. This change adds a section on this.


Repository:
  rL LLVM

https://reviews.llvm.org/D64245

Files:
  docs/CommandGuide/llvm-objcopy.rst


Index: docs/CommandGuide/llvm-objcopy.rst
===================================================================
--- docs/CommandGuide/llvm-objcopy.rst
+++ docs/CommandGuide/llvm-objcopy.rst
@@ -460,6 +460,21 @@
 Additionally, all targets except ``binary`` and ``ihex`` can have ``-freebsd``
 as a suffix.
 
+BINARY INPUT AND OUTPUT
+-----------------------
+
+If ``binary`` is used as the value for :option:`--input-target`, the input file
+will be embedded as a data section in an ELF relocatable object, with symbols
+``_binary_<file_name>_start``, ``_binary_<file_name>_end``, and
+``_binary_<file_name>_size`` representing the start, end and size of the data,
+where ``<file_name>`` is the path of the input file as specified on the command
+line with non-alphanumeric characters converted to ``_``.
+
+If ``binary`` is used as the value for :option:`--output-target`, the output
+file will be a raw binary file, containing the memory image of the input file.
+Symbols and relocation information will be discarded. The image will start at
+the address of the first loadable section in the output.
+
 EXIT STATUS
 -----------
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64245.208162.patch
Type: text/x-patch
Size: 1129 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190705/e7e59033/attachment.bin>


More information about the llvm-commits mailing list