LLVM-MC(1)

πŸ’… LLVM-MC(1)

okay so this is the llvm-mc manual page, and it lives in the User Commands manual β€” yes, the manual name is folded in right here at the top like a little name tag 🫢. It's the page for llvm-mc 18, and bestie, we're gonna go through it together, no cap ✨.

🌸 NAME

llvm-mc - manual page for llvm-mc 18. That's the whole name section: short, iconic, periodt πŸ’….

🌈 DESCRIPTION

okay so here's the vibe. OVERVIEW: llvm machine code playground.

USAGE: the usage is literally:

llvm-mc [options] <input file>

Then it's giving OPTIONS: β€” and bestie, I got you, every single one is below 🫢. No skipping, no summarizing, fr fr.

πŸ’… OPTIONS

Full options buffet. Zero crumbs left behind, periodt πŸ’….

🎨 Color Options

  • --color β€” Use colors in output (default=autodetect). The default is autodetect, so it's not just gonna assume β€” it checks first πŸŽ€.

🧚 Generic Options

  • --help β€” Display available options (--help-hidden for more). Very helpful, very demure.
  • --help-list β€” Display list of available options (--help-list-hidden for more). List girlie πŸ“‹.
  • --version β€” Display the version of this program. Version check, slay βœ….

πŸ”₯ MC Options

  • -I <directory> β€” Directory of include files. Include path vibes πŸ“.
  • -M <string> β€” Disassembler options. Disassembler knob moment.
  • --arch=<string> β€” Target arch to assemble for, see -version for available targets. Arch check!

Action to perform:

  • --as-lex β€” Lex tokens from a .s file. Token tea 🍡.
  • --assemble β€” Assemble a .s file (default). This is the default, bestie πŸ‘‘.
  • --disassemble β€” Disassemble strings of hex bytes. Hex goblin mode πŸ”₯.
  • --mdis β€” Marked up disassembly of strings of hex bytes. Marked-up moment ✨.
  • --cdis β€” Colored disassembly of strings of hex bytes. Colorful chaos 🌈.
  • --compress-debug-sections=<value> β€” Choose DWARF debug sections compression:
    • =none β€” No compression
    • =zlib β€” Use zlib
    • =zstd β€” Use zstd
  • --defsym=<string> β€” Defines a symbol to be an integer constant. Symbol slay.
  • --fdebug-compilation-dir=<string> β€” Specifies the debug info's compilation dir. Debug dir details.
  • --fdebug-prefix-map=<= separated key-value pairs> β€” Map file source paths in debug info. Path mapping, iykyk.
  • --filetype=<value> β€” Choose an output file type:
    • =asm β€” Emit an assembly (.s) file
    • =null β€” Don't emit anything (for timing purposes)
    • =obj β€” Emit a native object (.o) file
  • -g β€” Generate dwarf debugging info for assembly source files. Debug info era πŸ›.
  • --large-code-model β€” Create cfi directives that assume the code might be more than 2gb away. Big code model energy.
  • --main-file-name=<string> β€” Specifies the name we should consider the input file. Main character file name πŸ‘‘.
  • --masm-hexfloats β€” Enable MASM-style hex float initializers (3F800000r). Hex float moment.
  • --masm-integers β€” Enable binary and hex masm integers (0b110 and 0ABCh). Masm integer vibes.
  • --mattr=<a1,+a2,-a3,...> β€” Target specific attributes (-mattr=help for details). Attribute check!.
  • --mcpu=<cpu-name> β€” Target a specific cpu type (-mcpu=help for details). CPU moment.
  • --motorola-integers β€” Enable binary and hex Motorola integers (%110 and $ABC). Motorola integers, iconic.
  • -n β€” Don't assume assembly file starts in the text section. No assumptions.
  • --no-exec-stack β€” File doesn't need an exec stack. Stack says no.
  • -o <filename> β€” Output filename. Output go brrr.
  • --output-asm-variant=<uint> β€” Syntax variant to use for output printing. Syntax variant tea.
  • --position-independent β€” Position independent. PIE vibes.
  • --preserve-comments β€” Preserve Comments in outputted assembly. Keep the comments! πŸ’¬.
  • --print-imm-hex β€” Prefer hex format for immediate values. Hex immediates, slay.
  • --relax-relocations β€” Emit R_X86_64_GOTPCRELX instead of R_X86_64_GOTPCREL. Relocation glow-up.
  • --save-temp-labels β€” Don't discard temporary labels. Save the temp labels πŸŽ€.
  • --show-encoding β€” Show instruction encodings. Encoding reveal.
  • --show-inst β€” Show internal instruction representation. Internal representation moment.
  • --show-inst-operands β€” Show instructions operands as parsed. Operands as parsed, periodt.
  • --split-dwarf-file=<filename> β€” DWO output filename. DWO file name.
  • --triple=<string> β€” Target triple to assemble for, see -version for available targets. Triple check!

k bye bestie πŸ’– β€” this page is from llvm-mc 18, dated June 2025, under LLVM-MC(1). slay, go assemble something cute ✨.

πŸ“¦ where this page comes from