LLVM-STRINGS(1)

✨ NAME ✨

llvm-strings β€” it prints strings. That's it, that's the whole vibe. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

llvm-strings [options] [input…]

🌸 DESCRIPTION 🌸

okay so bestie, llvm-strings is a tool that's meant to be a drop-in replacement for GNU's strings β€” like, same energy, same job. It goes looking for printable strings inside files and writes them straight out to the standard output stream. ✨

And what even is a printable string? It's any sequence of four (by default, anyway) or more printable ASCII characters. The end of the file β€” or literally any other byte β€” terminates the current sequence. Periodt. 🫢

llvm-strings hunts for strings in each input file you give it. But here's the tea: unlike GNU strings, it looks in the entire input file, no matter what the file format is, instead of restricting the search to certain sections of object files. Main character behavior tbh. πŸ‘‘

And if you specify - as an input, or you just... don't specify any input at all, the program reads from the standard input stream. Easy. πŸ’–


πŸ¦‹ EXAMPLE πŸ¦‹

$ cat input.txt
bars
foo
wibble blob
$ llvm-strings input.txt
bars
wibble blob

πŸ’… OPTIONS πŸ’…

  • --all, -a β€” Silently ignored. It's just there so GNU strings compatibility stays intact, bestie. No cap. πŸ™ˆ
  • --bytes=<length>, -n β€” Sets the minimum number of printable ASCII characters a sequence of bytes needs to have before we'll call it a string. The default value is 4. ⭐
  • --help, -h β€” Displays a summary of the command line options. Iconic, helpful, we love her. πŸ’–
  • --print-file-name, -f β€” Displays the name of the containing file before each string. So you always know who's speaking. πŸŽ€

Example:

$ llvm-strings --print-file-name test.o test.elf
test.o: _Z5hellov
test.o: some_bss
test.o: test.cpp
test.o: main
test.elf: test.cpp
test.elf: test2.cpp
test.elf: _Z5hellov
test.elf: main
test.elf: some_bss
  • --radix=<radix>, -t β€” Displays the offset within the file of each string β€” before the string, obviously β€” using the specified radix. Valid <radix> values are o, d and x, for octal, decimal and hexadecimal respectively. 🧚

Example:

$ llvm-strings --radix=o test.o
    1054 _Z5hellov
    1066 .rela.text
    1101 .comment
    1112 some_bss
    1123 .bss
    1130 test.cpp
    1141 main
$ llvm-strings --radix=d test.o
    556 _Z5hellov
    566 .rela.text
    577 .comment
    586 some_bss
    595 .bss
    600 test.cpp
    609 main
$ llvm-strings -t x test.o
    22c _Z5hellov
    236 .rela.text
    241 .comment
    24a some_bss
    253 .bss
    258 test.cpp
    261 main
  • --version β€” Displays the version of the llvm-strings executable. Slay. 🌈
  • @<FILE> β€” Read command-line options from response file <FILE>. Yes bestie, a whole file of options. Obsessed. πŸ’œ

πŸ”₯ EXIT STATUS πŸ”₯

llvm-strings exits with a non-zero exit code if there is an error. Otherwise? It exits with code 0. Clean, no drama. 😌


πŸ’€ BUGS πŸ’€

To report bugs, please visit <https://github.com/llvm/llvm-project/labels/tools:llvm-strings/>. Don't be shy, they wanna hear it fr fr. πŸ›


πŸ‘‘ AUTHOR πŸ‘‘

Maintained by the LLVM Team (https://llvm.org/). Absolute legends. 🫢


2003-2025, LLVM Project


okay that's the whole page, bestie β€” you made it to the end πŸŽ€ and just so you know: this was LLVM's own llvm-strings manual, version 14, dated 2025-05-22. Go forth and find some strings, you've got this. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from