NAME
llvm-strings - print strings
SYNOPSIS
llvm-strings [options] [input…]
DESCRIPTION
llvm-strings is a tool intended as a drop-in replacement for GNU’s strings, which looks for printable strings in files and writes them to the standard output stream. A printable string is any sequence of four (by default) or more printable ASCII characters. The end of the file, or any other byte, terminates the current sequence.
llvm-strings looks for strings in each input file specified. Unlike GNU strings it looks in the entire input file, regardless of file format, rather than restricting the search to certain sections of object files. If “-” is specified as an input, or no input is specified, the program reads from the standard input stream.
EXAMPLE
$ cat input.txtbarsfoowibble blob$ llvm-strings input.txtbarswibble blob
OPTIONS
- --all, -a
-
Silently ignored. Present for GNU strings compatibility.
- --bytes=<length>, -n
-
Set the minimum number of printable ASCII characters required for a sequence of bytes to be considered a string. The default value is 4.
- --help, -h
-
Display a summary of command line options.
- --print-file-name, -f
-
Display the name of the containing file before each string.
Example:
$ llvm-strings --print-file-name test.o test.elftest.o: _Z5hellovtest.o: some_bsstest.o: test.cpptest.o: maintest.elf: test.cpptest.elf: test2.cpptest.elf: _Z5hellovtest.elf: maintest.elf: some_bss
- --radix=<radix>, -t
-
Display the offset within the file of each string, before the string and using the specified radix. Valid <radix> values are o, d and x for octal, decimal and hexadecimal respectively.
Example:
$ llvm-strings --radix=o test.o1054 _Z5hellov1066 .rela.text1101 .comment1112 some_bss1123 .bss1130 test.cpp1141 main$ llvm-strings --radix=d test.o556 _Z5hellov566 .rela.text577 .comment586 some_bss595 .bss600 test.cpp609 main$ llvm-strings -t x test.o22c _Z5hellov236 .rela.text241 .comment24a some_bss253 .bss258 test.cpp261 main
- --version
-
Display the version of the llvm-strings executable.
- @<FILE>
-
Read command-line options from response file <FILE>.
EXIT STATUS
llvm-strings 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/>.
AUTHOR
Maintained by the LLVM Team (https://llvm.org/).
COPYRIGHT
2003-2023, LLVM Project