LLVM-MC(1)
π NAME π
llvm-mc β bestie, this is the manual page for llvm-mc 16. It's the LLVM machine code playground, and yes we ARE playing in it. πβ¨
π DESCRIPTION π
okay so, straight from the source, the OVERVIEW is literally: llvm machine code playground π’
And the USAGE? Here's exactly how you run it, no notes:
llvm-mc [options] <input file>
then it's justβ¦ OPTIONS: and a whole buffet of them. let's go, we're going down the list one by one because I love you and I refuse to let you skip any. π
π¨ Color Options
--colorβ use colors in output π the default here isautodetect, meaning it peeks around and decides for itself whether your terminal can handle the sparkle. π¦
π οΈ Generic Options
--helpβ display available options (and--help-hiddenfor more, if you're nosy π)--help-listβ display a list of available options (--help-list-hiddenfor more, same energy)--versionβ display the version of this program. iconic. π
π§ MC Options
-I <directory>β directory of include files π-M <string>β disassembler options--arch=<string>β target arch to assemble for, see-versionfor available targets
π« Action to perform:
--as-lexβ lex tokens from a.sfile π€--assembleβ assemble a.sfile. this one is the default, so if you say nothing, it's already doing this. main character behavior fr π«Ά--disassembleβ disassemble strings of hex bytes π’--mdisβ marked up disassembly of strings of hex bytes β¨
back to the rest of the MC options π
--compress-debug-sections=<value>β choose DWARF debug sections compression. your vibes-based menu is:=noneβ no compression π=zlibβ use zlib=zstdβ use zstd
--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>β map file source paths in debug info πΊοΈ--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 π£--large-code-modelβ create cfi directives that assume the code might be more than 2gb away ποΈ--main-file-name=<string>β specifies the name we should consider the input file π·οΈ--masm-hexfloatsβ enable MASM-style hex float initializers (3F800000r) π--masm-integersβ enable binary and hex masm integers (0b110and0ABCh) π’--mattr=<a1,+a2,-a3,...>β target specific attributes (-mattr=helpfor details) βοΈ--mcpu=<cpu-name>β target a specific cpu type (-mcpu=helpfor details) π§--motorola-integersβ enable binary and hex Motorola integers (%110and$ABC) ποΈ-nβ don't assume assembly file starts in the text section--no-exec-stackβ file doesn't need an exec stack π«-o <filename>β output filename π--output-asm-variant=<uint>β syntax variant to use for output printing--position-independentβ position independent πΊ--preserve-commentsβ preserve comments in outputted assembly π¬--print-imm-hexβ prefer hex format for immediate values π‘--relax-relocationsβ emitR_X86_64_GOTPCRELXinstead ofR_X86_64_GOTPCREL--save-temp-labelsβ don't discard temporary labels π·οΈ--show-encodingβ show instruction encodings π--show-instβ show internal instruction representation π§©--show-inst-operandsβ show instructions operands as parsed πͺ--split-dwarf-file=<filename>β DWO output filename π§¬--triple=<string>β target triple to assemble for, see-versionfor available targets π―
bestie that's the whole list, every single one, I did not gatekeep a thing. π«Ά
and that's a wrap on llvm-mc 16, brought to you by the April 2024 edition of the page. go assemble something cute. byeee πβ¨π
π¦ 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