llvm-strip.rst 5.87 KB

llvm-strip - object stripping tool

SYNOPSIS

:program:`llvm-strip` [options] inputs...

DESCRIPTION

:program:`llvm-strip` is a tool to strip sections and symbols from object files. If no other stripping or remove options are specified, :option:`--strip-all` will be enabled.

By default, the input files are modified in-place. If "-" is specified for the input file, the input is read from the program's standard input stream.

If the input is an archive, any requested operations will be applied to each archive member individually.

The tool is still in active development, but in most scenarios it works as a drop-in replacement for GNU's :program:`strip`.

GENERIC AND CROSS-PLATFORM OPTIONS

The following options are either agnostic of the file format, or apply to multiple file formats.

COFF-SPECIFIC OPTIONS

The following options are implemented only for COFF objects. If used with other objects, :program:`llvm-strip` will either emit an error or silently ignore them.

ELF-SPECIFIC OPTIONS

The following options are implemented only for ELF objects. If used with other objects, :program:`llvm-strip` will either emit an error or silently ignore them.

EXIT STATUS

:program:`llvm-strip` exits with a non-zero exit code if there is an error. Otherwise, it exits with code 0.

BUGS

To report bugs, please visit <https://bugs.llvm.org/>.

SEE ALSO

:manpage:`llvm-objcopy(1)`