LLVM-STRINGS(1)
β¨ LLVM-STRINGS(1) β¨
okay so bestie, we're in section 1 of the LLVM manual, and today's main character is llvm-strings π
π NAME π
llvm-strings β print strings π¦
πΈ SYNOPSIS πΈ
llvm-strings [options] [inputβ¦]
β¨ DESCRIPTION β¨
so llvm-strings is literally a drop-in replacement for GNU's strings π it goes looking for printable strings in files and writes them straight to the standard output stream. and what counts as a printable string? 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. π
llvm-strings hunts for strings in each input file you specify. 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. no cap. π₯
and if you pass - 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
(yeah it ate that up, foo was too short to make the cut π)
π OPTIONS π
--all,-aβ silently ignored. it's just there for GNUstringscompatibility. it's giving "present but not participating" π--bytes=<length>,-nβ sets the minimum number of printable ASCII characters a sequence of bytes needs before it counts as a string. the default value is4.--help,-hβ shows you a summary of the command line options. your lil cheat sheet β¨--print-file-name,-fβ displays the name of the containing file before each string. iconic behaviour tbh.
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, using the radix you specified. valid<radix>values areo,dandxfor octal, decimal and hexadecimal respectively. pick your fighter π
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 thellvm-stringsexecutable. π@<FILE>β reads command-line options from the response file<FILE>. yes bestie, 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. slay. β¨
π BUGS π
to report bugs, please visit <β https://github.com/llvm/llvm-project/labels/tools:llvm-strings/. (yes the URL is doing the most, that's just how it is π)
π AUTHOR π
maintained by the LLVM Team (https://llvm.org/). absolute legends.
π COPYRIGHT π
2003-2024, LLVM Project
and that's the whole page bestie, you're so welcome π this was version 15, dated 2024-04-14 β go forth and find those strings, iykyk ππ¦
π¦ where this page comes from
- ubuntu noble: llvm-16 1:16.0.6-23ubuntu4 Β· APACHE-2-LLVM-EXCEPTIONS
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms