Object file copier ==================++ The object file copier utility copies the contents of the specified ELF `infile` object file to a new object file named `outfile`, while performing transformations on the copied file that are specified by the command options. If the `outfile` argument is not specified, the utility names the copied file `infile`, thus overwriting the original file. Note This utility returns zero on success, or greater than zero if an error occurs. # Command To start the object file copier utility from the command line: hexagon-llvm-objcopy [] [] Copy to clipboard Where `option` is one or more of the following: --add-gnu-debuglink= --add-section=section= --binary-architecture= --build-id-link-dir= --build-id-link-input= --build-id-link-output= --compress-debug-sections=[zlib|zlib-gnu] -decompress-debug-sections -disable-deterministic-archives | -U -discard-all --dump-section=section= -enable-deterministic-archives | -D -extract-dwo --globalize-symbol= --help --input-target= -keep-file-symbols --keep-global-symbol= --keep-global-symbols= --keep-section=
--keep-symbol= -localize-hidden --localize-symbol= -only-keep-debug --only-section=section --output-target= --prefix-symbols= -preserve-dates --redefine-sym== --redefine-syms= --rename-section==[,,...] --remove-section=
--split-dwo= -strip-all -strip-all-gnu -strip-debug | -g -strip-dwo -strip-non-alloc -strip-sections --strip-symbol= -strip-unneeded --target= -version -weaken --weaken-symbol= Copy to clipboard # Options --add-gnu-debuglink= Copy to clipboard Add a `.gnu_debuglink` for the specified debug file. --add-section=section= Copy to clipboard Make a section named `section` with the contents of the specified file. --binary-architecture= Copy to clipboard Used when transforming an architecture-less format (such as binary) to another format. --build-id-link-dir= Copy to clipboard Set the directory for `--build-id-link-input` and `--build-id-link-output` to ``. --build-id-link-input= Copy to clipboard Hard-link the input to the `/xx/xxx` name derived from the Hexagon build ID. --build-id-link-output= Copy to clipboard Hard-link the output to the `/xx/xxx` name derived from the Hexagon build ID. --compress-debug-sections=[zlib|zlib-gnu] Copy to clipboard Compress DWARF debug sections using the specified style. Supported styles: `zlib-gnu` and `zlib`. -decompress-debug-sections Copy to clipboard Decompress DWARF debug sections. -disable-deterministic-archives -U Copy to clipboard Disable deterministic mode when copying archives (use real values for UIDs, GIDs, and timestamps). -discard-all Copy to clipboard Remove all local symbols except file and section symbols. --dump-section=section= Copy to clipboard Dump the contents of the specified section into the specified file. -enable-deterministic-archives -D Copy to clipboard Enable deterministic mode when copying archives (use zero for UIDs, GIDs, and timestamps). -extract-dwo Copy to clipboard Remove all sections that are not DWARF `.dwo` sections from file. --globalize-symbol= Copy to clipboard Mark the specified symbol as global. --help Copy to clipboard Display command usage information and then exit. --input-target= Copy to clipboard Format of the input file. -keep-file-symbols Copy to clipboard Do not remove file symbols. --keep-global-symbol= Copy to clipboard Convert all symbols except the specified symbol to local. This option can be repeated to convert all except a set of symbols to local. --keep-global-symbols= Copy to clipboard Read a list of symbols from the specified file and run it as if `--keep-global-symbol=symbol` is set for each symbol. `filename` contains one symbol per line and can contain comments beginning with #. Leading and trailing white spaces are stripped from each line. This option can be repeated to read symbols from many files. --keep-section=
Copy to clipboard Do not remove specified section. --keep-symbol= Copy to clipboard Do not remove the specified symbol. -localize-hidden Copy to clipboard Mark all symbols that have hidden or internal visibility set as local. --localize-symbol= Copy to clipboard Mark the specified symbol as local. -only-keep-debug Copy to clipboard Currently ignored. This option is only for compatibility with GNU `objcopy`. --only-section=
Copy to clipboard Remove all but `
`. --output-target= Copy to clipboard Format of the output file. --prefix-symbols= Copy to clipboard Add the specified prefix to the start of every symbol name. -preserve-dates Copy to clipboard Preserve access and modification timestamps. --redefine-sym=old=new Copy to clipboard Change the symbol name from `old` to `new`. --redefine-syms= Copy to clipboard Reads a list of symbol pairs from `` and runs as if `--redefine-sym=old=new` is set for each one. The `` contains two symbols per line separated with a whitespace character, and it might contain comments beginning with #. Leading and trailing whitespace characters are stripped from each line. This option can be repeated to read symbols from many files. --rename-section=old=new[,,...] Copy to clipboard Rename a section from `old` to `new`, optionally with specified flags. Flags supported for GNU compatibility: `alloc`, `load`, `noload`, `readonly`, `debug`, `code`, `data`, `rom`, `share`, `contents`, `merge`, `strings`. --remove-section=
Copy to clipboard Remove the specified section. --split-dwo= Copy to clipboard Equivalent to `extract-dwo` on the input file to `` and `strip-dwo` on the input file. -strip-all Copy to clipboard Remove non-allocated sections other than `.gnu.warning*` sections. -strip-all-gnu Copy to clipboard Compatible with GNU `objcopy` option, `--strip-all`. -strip-debug -g Copy to clipboard Remove all debug information. -strip-dwo Copy to clipboard Remove all DWARF `*.dwo` sections from the file. -strip-non-alloc Copy to clipboard Remove all non-allocated sections. -strip-sections Copy to clipboard Remove all section headers. --strip-symbol= Copy to clipboard Remove the specified symbol. -strip-unneeded Copy to clipboard Remove all symbols not required by relocations. --target= Copy to clipboard Format of the input and output file. -version Copy to clipboard Display the version identifier and then exit. -weaken Copy to clipboard Mark all global symbols as weak. --weaken-symbol= Copy to clipboard Mark the specified symbol as weak. Last Published: Oct 06, 2026 [Previous Topic Output formats](https://docs.qualcomm.com/bundle/publicresource/80-N3040-23/topics/object-file-symbols.md) [Next Topic Object file viewer](https://docs.qualcomm.com/bundle/publicresource/80-N3040-23/topics/object-file-viewer.md)