1 llvm-strings - print strings
2 ============================
4 .. program:: llvm-strings
9 :program:`llvm-strings` [*options*] [*input...*]
14 :program:`llvm-strings` is a tool intended as a drop-in replacement for GNU's
15 :program:`strings`, which looks for printable strings in files and writes them
16 to the standard output stream. A printable string is any sequence of four (by
17 default) or more printable ASCII characters. The end of the file, or any other
18 byte, terminates the current sequence.
20 :program:`llvm-strings` looks for strings in each ``input`` file specified.
21 Unlike GNU :program:`strings` it looks in the entire input file, regardless of
22 file format, rather than restricting the search to certain sections of object
23 files. If "``-``" is specified as an ``input``, or no ``input`` is specified,
24 the program reads from the standard input stream.
29 .. code-block:: console
35 $ llvm-strings input.txt
44 Silently ignored. Present for GNU :program:`strings` compatibility.
46 .. option:: --bytes=<length>, -n
48 Set the minimum number of printable ASCII characters required for a sequence of
49 bytes to be considered a string. The default value is 4.
51 .. option:: --help, -h
53 Display a summary of command line options.
55 .. option:: --print-file-name, -f
57 Display the name of the containing file before each string.
61 .. code-block:: console
63 $ llvm-strings --print-file-name test.o test.elf
74 .. option:: --radix=<radix>, -t
76 Display the offset within the file of each string, before the string and using
77 the specified radix. Valid ``<radix>`` values are ``o``, ``d`` and ``x`` for
78 octal, decimal and hexadecimal respectively.
82 .. code-block:: console
84 $ llvm-strings --radix=o test.o
92 $ llvm-strings --radix=d test.o
100 $ llvm-strings -t x test.o
109 .. option:: --version
111 Display the version of the :program:`llvm-strings` executable.
115 Read command-line options from response file ``<FILE>``.
120 :program:`llvm-strings` exits with a non-zero exit code if there is an error.
121 Otherwise, it exits with code 0.
126 To report bugs, please visit <https://github.com/llvm/llvm-project/labels/tools:llvm-strings/>.