[llvm] r365312 - [docs][llvm-objcopy] Add description of binary input/output to doc

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 04:41:54 PDT 2019


Author: jhenderson
Date: Mon Jul  8 04:41:54 2019
New Revision: 365312

URL: http://llvm.org/viewvc/llvm-project?rev=365312&view=rev
Log:
[docs][llvm-objcopy] Add description of binary input/output to doc

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

Reviewed by: MaskRay, abrachet

Differential Revision: https://reviews.llvm.org/D64245

Modified:
    llvm/trunk/docs/CommandGuide/llvm-objcopy.rst

Modified: llvm/trunk/docs/CommandGuide/llvm-objcopy.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CommandGuide/llvm-objcopy.rst?rev=365312&r1=365311&r2=365312&view=diff
==============================================================================
--- llvm/trunk/docs/CommandGuide/llvm-objcopy.rst (original)
+++ llvm/trunk/docs/CommandGuide/llvm-objcopy.rst Mon Jul  8 04:41:54 2019
@@ -457,8 +457,23 @@ options. For GNU :program:`objcopy` comp
 - `elf32-sparc`
 - `elf32-sparcel`
 
-Additionally, all targets except ``binary`` and ``ihex`` can have ``-freebsd``
-as a suffix.
+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
 -----------




More information about the llvm-commits mailing list