brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.8 KiB · 0a9ab5d Raw
127 lines · plain
1llvm-strings - print strings2============================3 4.. program:: llvm-strings5 6SYNOPSIS7--------8 9:program:`llvm-strings` [*options*] [*input...*]10 11DESCRIPTION12-----------13 14:program:`llvm-strings` is a tool intended as a drop-in replacement for GNU's15:program:`strings`, which looks for printable strings in files and writes them16to the standard output stream. A printable string is any sequence of four (by17default) or more printable ASCII characters. The end of the file, or any other18byte, terminates the current sequence.19 20:program:`llvm-strings` looks for strings in each ``input`` file specified.21Unlike GNU :program:`strings` it looks in the entire input file, regardless of22file format, rather than restricting the search to certain sections of object23files. If "``-``" is specified as an ``input``, or no ``input`` is specified,24the program reads from the standard input stream.25 26EXAMPLE27-------28 29.. code-block:: console30 31 $ cat input.txt32 bars33 foo34 wibble blob35 $ llvm-strings input.txt36 bars37 wibble blob38 39OPTIONS40-------41 42.. option:: --all, -a43 44 Silently ignored. Present for GNU :program:`strings` compatibility.45 46.. option:: --bytes=<length>, -n47 48 Set the minimum number of printable ASCII characters required for a sequence of49 bytes to be considered a string. The default value is 4.50 51.. option:: --help, -h52 53 Display a summary of command line options.54 55.. option:: --print-file-name, -f56 57 Display the name of the containing file before each string.58 59 Example:60 61 .. code-block:: console62 63  $ llvm-strings --print-file-name test.o test.elf64  test.o: _Z5hellov65  test.o: some_bss66  test.o: test.cpp67  test.o: main68  test.elf: test.cpp69  test.elf: test2.cpp70  test.elf: _Z5hellov71  test.elf: main72  test.elf: some_bss73 74.. option:: --radix=<radix>, -t75 76 Display the offset within the file of each string, before the string and using77 the specified radix. Valid ``<radix>`` values are ``o``, ``d`` and ``x`` for78 octal, decimal and hexadecimal respectively.79 80 Example:81 82 .. code-block:: console83 84  $ llvm-strings --radix=o test.o85      1054 _Z5hellov86      1066 .rela.text87      1101 .comment88      1112 some_bss89      1123 .bss90      1130 test.cpp91      1141 main92  $ llvm-strings --radix=d test.o93      556 _Z5hellov94      566 .rela.text95      577 .comment96      586 some_bss97      595 .bss98      600 test.cpp99      609 main100  $ llvm-strings -t x test.o101      22c _Z5hellov102      236 .rela.text103      241 .comment104      24a some_bss105      253 .bss106      258 test.cpp107      261 main108 109.. option:: --version110 111 Display the version of the :program:`llvm-strings` executable.112 113.. option:: @<FILE>114 115 Read command-line options from response file ``<FILE>``.116 117EXIT STATUS118-----------119 120:program:`llvm-strings` exits with a non-zero exit code if there is an error.121Otherwise, it exits with code 0.122 123BUGS124----125 126To report bugs, please visit <https://github.com/llvm/llvm-project/labels/tools:llvm-strings/>.127