LLVM-DIS(1)

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

πŸ’… LLVM-DIS β€” the LLVM disassembler, bestie edition

okay so picture this: you've got a .bc file, right? it's giving ✨binary✨, it's giving unreadable, it's giving absolutely nothing to the human eye. and llvm-dis? she's the translator. she takes that LLVM bitcode file and flips it into human-readable LLVM assembly language. that's it. that's the whole job. and she eats every time. πŸ‘‘


✨ SYNOPSIS ✨

llvm-dis [options] [filename]

πŸ¦‹ DESCRIPTION πŸ¦‹

The llvm-dis command is the LLVM disassembler, no cap. It takes an LLVM bitcode file and converts it into human-readable LLVM assembly language.

Now, about the filename β€” if you omit it, or you literally just pass a -? then llvm-dis reads its input from standard input. main character move, honestly.

And here's the part where the output goes, so listen up bestie, because it depends πŸ‘€:

  • If the input is being read from standard input, then llvm-dis will send its output to standard output by default.
  • Otherwise, the output gets written to a file named after the input file, with a .ll suffix added β€” and btw, any existing .bc suffix will first be removed. so thing.bc β†’ thing.ll. slay. πŸ’…

You can override the whole choice of output file using the -o option. you're in charge, periodt.


πŸŽ€ OPTIONS πŸŽ€

  • -f β€” Enable binary output on terminals. Normally, llvm-dis will refuse to write raw bitcode output if the output stream is a terminal. With this option, llvm-dis will write raw bitcode regardless of the output device. (yes she's stubborn. yes she'll do it anyway. πŸ™ˆ)
  • -help β€” Print a summary of command line options. your little cheat sheet, your little bestie who tells you what's up. 🫢
  • -o filename β€” Specify the output file name. If filename is -, then the output is sent to standard output. choose your own destiny, babe ✨

🌈 EXIT STATUS 🌈

If llvm-dis succeeds, it will exit with 0. πŸŽ‰ Otherwise, if an error occurs, it will exit with a non-zero value. πŸ’€ so like, check that exit code, fr fr.


πŸ‘‘ SEE ALSO πŸ‘‘

llvm-as(1)

(her counterpart. the assembler. the one who goes the other direction. iconic duo honestly 🧚)


πŸ’œ AUTHOR πŸ’œ

Maintained by the LLVM Team (<https://llvm.org/>).


2003-2024, LLVM Project


ok that's the whole page, you're officially fluent in disassembly now, no cap. go turn some bitcode into art, bestie. πŸ¦‹βœ¨

LLVM-DIS, manual section 1 β€” this version is dated 2024-07-18, and it's an LLVM page, so shoutout to the LLVM Project for the whole thing. mwah. πŸ’–

πŸ“¦ where this page comes from