LLVM-MC(1)
π NAME π
llvm-mc β bestie, this is the manual page for llvm-mc 14, and it lives in the User Commands section of the manual. Come sit with me, we're gonna read it together and it's gonna be iconic. π«Ά
π DESCRIPTION π
OVERVIEW: llvm machine code playground πβ¨
USAGE:
llvm-mc [options] <input file>
OPTIONS:
π Color Options π
--colorβ turns on colors in the output. The default isautodetect, so it just vibes and figures out whether your terminal can handle the sparkle. π
β¨ Generic Options β¨
--helpβ shows you all the available options. Want even more? There's--help-hiddenfor the extra secret ones. π--help-listβ prints out the list of available options. And yeah, there's--help-list-hiddenif you want the hidden list too. π--versionβ shows you the version of this program. That's it, that's the whole job. β
π₯ MC Options π₯
-I=<directory>β directory where the include files live. π-M=<string>β disassembler options. π§--arch=<string>β the target arch you're assembling for. Not sure which ones exist? Peek at-versionfor the available targets. ποΈ
π¬ Action to perform π¬
--as-lexβ lex tokens out of a.sfile. π€--assembleβ assemble a.sfile. This one is the default, so it's the main character. π--disassembleβ disassemble strings of hex bytes. π--mdisβ marked up disassembly of strings of hex bytes. β¨
ποΈ And the rest of the MC options ποΈ
--compress-debug-sections=<value>β choose how DWARF debug sections get compressed:=noneβ no compression at all, just raw.=zlibβ use zlib compression.=zlib-gnuβ use zlib-gnu compression. β οΈ This one is deprecated, so, like, know that going in.
--defsym=<string>β defines a symbol to be an integer constant. π’--fdebug-compilation-dir=<string>β specifies the debug info's compilation dir. ποΈ--fdebug-prefix-map=<= separated key-value pairs>β maps file source paths in debug info. πΊοΈ--filetype=<value>β choose an output file type:=asmβ emit an assembly (.s) file.=nullβ don't emit anything. It's for timing purposes, not for results. π=objβ emit a native object (.o) file.
-gβ generate dwarf debugging info for assembly source files. π--large-code-modelβ creates cfi directives that assume the code might be more than 2gb away. Yes, 2gb. Big girl energy. πͺ--main-file-name=<string>β specifies the name we should consider the input file. π·οΈ--masm-hexfloatsβ enables MASM-style hex float initializers, like3F800000r. πΈ--masm-integersβ enables binary and hex masm integers, like0b110and0ABCh. π--mattr=<a1,+a2,-a3,...>β target specific attributes. Hit up-mattr=helpfor the details. ποΈ--mcpu=<cpu-name>β target a specific cpu type. Same deal,-mcpu=helphas the details. π§--motorola-integersβ enables binary and hex Motorola integers, like%110and$ABC. π-nβ don't assume the assembly file starts in the text section. π--no-exec-stackβ this file doesn't need an exec stack. π«-o=<filename>β output filename. πΎ--output-asm-variant=<uint>β which syntax variant to use for output printing. π¨--position-independentβ position independent. π--preserve-commentsβ preserves comments in the outputted assembly. π (we love a comment that survives)--print-imm-hexβ prefers hex format for immediate values. π‘--relax-relocationsβ emitsR_X86_64_GOTPCRELXinstead ofR_X86_64_GOTPCREL. π--save-temp-labelsβ doesn't discard temporary labels. πΎ--show-encodingβ shows instruction encodings. π¬--show-instβ shows the internal instruction representation. π«§--show-inst-operandsβ shows instruction operands as parsed. π§©--split-dwarf-file=<filename>β DWO output filename. πΌ--triple=<string>β the target triple you're assembling for. Again,-versionlists the available targets. π―
ok bestie that's the whole page, every single option accounted for, no cap. now go forth and assemble something gorgeous. π β¨
llvm-mc 14 Β· May 2025 Β· LLVM-MC(1) β mwah, love u, bye! ππ¦π
π¦ where this page comes from
- ubuntu questing: llvm-14 1:14.0.6-20ubuntu3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms