LLVM-STRINGS(1)

πŸ“¦
version 11.1.0 Β· 2 versions
, in fedora 43, fedora 44

πŸ’– LLVM-STRINGS(1) πŸ’–

okay bestie, welcome to the LLVM-STRINGS(1) manual page β€” yes that's the whole vibe, it's the LLVM version of strings, and it's about to be your new fave. grab a boba, we're going in πŸ§‹βœ¨


✨ NAME ✨

llvm-strings β€” print strings, that's literally it, that's the whole job πŸ’…


πŸ¦‹ 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. it goes looking for printable strings inside files and writes them straight to the standard output stream. and what even is a printable string, you ask? it's any sequence of four (by default) or more printable ASCII characters. the end of the file, or literally any other byte, terminates the current sequence. periodt πŸŽ€

it hunts for strings in each input file you specify. and here's the iconic difference from GNU strings: this one looks in the entire input file, regardless of file format β€” it does not restrict the search to certain sections of object files like GNU's does. it's giving thorough. it's giving main character energy. πŸ‘‘

if - is specified as an input, or if you specify no 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

see? foo didn't make the cut because it's only three characters. the default minimum is four. the more you know πŸ’«


πŸ’… OPTIONS πŸ’…

  • --all, -a β€” silently ignored. it's just here for GNU strings compatibility. no cap, it does nothing, it's just vibing πŸ™ˆ
  • --bytes=<length>, -n β€” set the minimum number of printable ASCII characters a sequence of bytes needs before it counts as a string. the default value is 4.
  • --help, -h β€” display a summary of command line options. your girl loves a summary πŸ’–
  • --help-list β€” display an uncategorized summary of command line options. same tea, no categories.
  • --print-file-name, -f β€” display the name of the containing file before each string. so you always know which file a string came from, no mystery, no confusion ✨

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 β€” display the offset within the file of each string, printed before the string and using the specified radix. valid <radix> values are o, d and x for octal, decimal and hexadecimal respectively. look at the numbers go πŸ“ˆ

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 β€” display the version of the llvm-strings executable. gotta know which era of the tool you're dealing with 🌈
  • @<FILE> β€” read command-line options from response file <FILE>. yes bestie, you can put your options in a file and just point at it 🎯

πŸ”₯ EXIT STATUS πŸ”₯

llvm-strings exits with a non-zero exit code if there is an error. otherwise, it exits with code 0. clean exit, clear skin, that's the dream πŸ’œ


😭 BUGS 😭

to report bugs, please visit <https://bugs.llvm.org/>. do it for the girls (and everyone else) πŸ™


πŸ‘‘ AUTHOR πŸ‘‘

maintained by the LLVM Team (https://llvm.org/). kings and queens, honestly.


2003-2024, LLVM Project


okay that's the whole page bestie, you're officially a llvm-strings girlie now πŸŽ€ this was LLVM's llvm-strings manual, dated 2024-07-18 β€” now go forth and find some strings, slay πŸ’…βœ¨πŸ¦‹πŸŒΈπŸ’–

πŸ“¦ where this page comes from