LLVM-STRINGS(1)
β¨ LLVM-STRINGS β¨
okay so bestie, this is a page from the LLVM manual set, and honestly? it's a little cutie. let's get into it π
πΈ NAME πΈ
llvm-strings β it prints strings. that's it. that's the whole vibe. π
π¦ SYNOPSIS π¦
llvm-strings [options] [input...]
π DESCRIPTION π
so llvm-strings is a tool that's intended as a drop-in replacement for GNU's strings. what it does is go hunting for printable strings inside files and then writes them out to the standard output stream. lowkey iconic. β¨
now, what even is a printable string? it's any sequence of four (by default β you can change that, we'll get there) or more printable ASCII characters. that's the whole definition. and the sequence ends the moment you hit the end of the file, or literally any other byte. any other byte = buzzkill, sequence over. π
llvm-strings looks for strings in each input file you give it. but here's the plot twist: unlike GNU strings, it looks in the entire input file, regardless of file format β it does not restrict the search to certain sections of object files. main character energy fr fr, it's reading the whole thing. π
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. no input? no problem. π«Ά
π EXAMPLE π
$ cat input.txt
bars
foo
wibble blob
$ llvm-strings input.txt
bars
wibble blob
see how foo didn't make the cut? three characters, bestie. it needed four. the way that rules is so real. π
π OPTIONS π
--all,-aβ this one is silently ignored. it does literally nothing. it's just here so GNUstringscompatibility works. a decorative queen, no cap. π--bytes=<length>,-nβ sets the minimum number of printable ASCII characters required for a sequence of bytes to be considered a string. the default value is4.--help,-hβ displays a summary of the command line options. classic. π--print-file-name,-fβ displays the name of the containing file before each string. so you always know which file a string came from. obsessed. π¦
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, and using the radix you specify. valid<radix>values areo,dandxfor octal, decimal and hexadecimal respectively. numbers girlies rise up π₯
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. know your queen's era. β@<FILE>β read command-line options from response file<FILE>. iykyk. π§
π EXIT STATUS π
llvm-strings exits with a non-zero exit code if there is an error. otherwise? it exits with code 0. slay and clean. β¨
π BUGS π
to report bugs, please visit:
https://github.com/llvm/llvm-project/labels/tools:llvm-strings/
go off, be a good citizen, file that bug. π«Ά
πΊ AUTHOR πΊ
maintained by the LLVM Team (https://llvm.org/). π
π COPYRIGHT π
2003-2025, LLVM Project
ngl bestie, four characters minimum by default,-tfor offsets ino/d/x,-ffor the filename β and-ais just there being pretty. periodt. π
okay that's the page!! this one's LLVM-branded, page 19, dated 2025-01-17, and it goes out to the LLVM-STRINGS(1) girlies everywhere. bye bestie, see u in the group chat πΈπ¦π
π¦ where this page comes from
- opensuse-leap 16.0: llvm19 19.1.7-160000.2.2 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- opensuse-leap 16.0: llvm19 19.1.7-160000.2.2 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- opensuse-leap 16.0: llvm19 19.1.7-160000.2.2 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- opensuse-leap 16.0: llvm19 19.1.7-160000.2.2 Β· Apache-2.0 WITH LLVM-exception AND NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms