LLVM-STRINGS(1)

πŸ’– LLVM-STRINGS πŸ’–

okay bestie, welcome to the LLVM manual pages, and today's main character is llvm-strings, from the LLVM crew. it's giving "find the words hidden inside your files" energy and honestly? iconic. let's get into it πŸ¦‹


✨ NAME ✨

llvm-strings β€” print strings πŸ’…


✨ SYNOPSIS ✨

llvm-strings [options] [input...]

✨ DESCRIPTION ✨

so llvm-strings is a tool that's meant to be a drop-in replacement for GNU's strings, bestie. what it does is look for printable strings inside files and write them straight to the standard output stream. and a printable string? that's literally any sequence of four printable ASCII characters or more β€” four is the default, we'll get to that β€” and the sequence gets terminated by the end of the file, or by literally any other byte that shows up. no cap. 🌸

llvm-strings goes looking for strings in each input file you specify. but here's the tea, and it's a big difference from 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 like GNU does. so it's thorough. it's committed. it has main character energy.

and if you pass - as an input, or you don't specify any input at all? it reads from the standard input stream. 🫢


✨ EXAMPLE ✨

here's the vibe in action, bestie:

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

notice how foo did NOT make the cut? that's because it's only three characters and our minimum is four. sorry foo, better luck next time 😭


✨ OPTIONS ✨

  • --all, -a β€” Silently ignored. it's just here so GNU strings compatibility stays slaying. it does nothing. it's decorative. it's a vibe. πŸ’œ
  • --bytes=<length>, -n β€” sets the minimum number of printable ASCII characters a sequence of bytes needs before we're willing to call it a string. the default value is 4. want shorter strings? lower it. want only the long luxurious ones? raise it. ✨
  • --help, -h β€” shows you a summary of the command line options. your little map, bestie πŸŽ€
  • --print-file-name, -f β€” puts the name of the containing file in front of every single string, so you always know who said what. so organised.

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 β€” shows you the offset within the file of each string, printed before the string, using whatever radix you asked for. valid <radix> values are o, d and x β€” that's octal, decimal and hexadecimal respectively. three flavors, all delicious. 🌈

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. know your queen's birthday πŸ’…
  • @<FILE> β€” reads command-line options from the response file <FILE>. yes, options from a file. we love a delegation moment πŸ‘‘

✨ EXIT STATUS ✨

llvm-strings exits with a non-zero exit code if there's an error. otherwise? it exits with code 0. that's it, that's the whole mood. clean. βœ…


✨ BUGS ✨

found a bug, bestie? 😭 don't suffer in silence β€” go report it at <<https://github.com/llvm/llvm-project/labels/tools:llvm-strings/>>. the team will literally thank you. 🫢


✨ AUTHOR ✨

maintained by the LLVM Team (https://llvm.org/). they're the ones keeping this whole thing cute and functional. πŸ’–


2003-2026, LLVM Project β€” yeah, they've been at this a while. legends only. πŸ‘‘


okay that's the whole page, bestie!! this was LLVM-STRINGS(1), page 22, dated 2026-07-16, straight from the LLVM source. mwah πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from