YASM_OBJFMTS(7)
π yasm_objfmts β Yasm Supported Object Formats π
okay bestie, so this is the yasm_objfmts(7) page from the Yasm manual β it's the whole rundown of every object format Yasm can spit out. manual name is right there in the title, so no need to scroll for it. let's get into it β¨
πΈ SYNOPSIS πΈ
yasm -f objfmt ...
like, that's the whole vibe. you pick your format, you go. π
β¨ DESCRIPTION β¨
so the standard Yasm distribution ships with a bunch of modules for different object formats β and the object format is Yasm's primary output, so this is kind of a big deal.
you select the object format on the yasm(1) command line using the -f objfmt command line option. that's it. that's the switch. π
π¦ BIN π¦
the "bin" object format makes a flat-format, non-relocatable binary file. it's the one you want for producing DOS .COM executables, or for things like boot blocks. ngl it's lowkey minimal: it supports only 3 sections, and those sections get written in a predefined order to the output file. no negotiating. π¦
π COFF π
COFF is an older relocatable object format used on older Unix and compatible systems β and also, more recently, on the DJGPP development system for DOS. vintage vibes, still showing up to the party. π°οΈ
π DBG π
the "dbg" object format is not a "real" object format β bestie, it's not even pretending. what it actually does is create an output file that simply describes:
- the sequence of calls made to it by Yasm
- the final object and symbol table information
...all in a human-readable text format. and yeah, in a normal object format all of that would get processed into that format's particular binary representation instead. so this one is not intended for real use β it's for debugging Yasm's internals. it's giving backstage pass, not main character. π«Ά
π ELF π
the ELF object format really comes in three flavors:
"elf32"β for 32-bit targets"elf64"β for 64-bit targets"elfx32"β for x32 targets
ELF is a standard object format in common use on modern Unix and compatible systems (e.g. Linux, FreeBSD). and it has complex support for relocatable and shared objects. it's the it-girl of object formats fr fr. π
π MACHO π
Mach-O really comes in two flavors:
"macho32"β for 32-bit targets"macho64"β for 64-bit targets
Mach-O is used as the object format on MacOS X. important caveat though: as Yasm currently only supports x86 and AMD64 instruction sets, it can only generate Mach-O objects for Intel-based Macs. so if you were hoping for something else, that's a no from the codebase. π
π RDF π
the RDOFF2 object format is a simple multi-section format that was originally designed for NASM. it supports segment references but not WRT references β noted, don't try it.
it was designed primarily for simplicity, and it has minimalistic headers for ease of loading and linking. and a complete toolchain β linker, librarian, and loader β is distributed with NASM. full set, no missing pieces. π§°
π WIN32 π
the Win32 object format produces object files compatible with Microsoft compilers (such as Visual C++) that target the 32-bit x86 Windows platform. and plot twist: the object format itself is an extended version of COFF. glow-up. β¨
π₯ WIN64 π₯
the Win64 object format produces object files compatible with Microsoft compilers that target the 64-bit "x64" Windows platform. this format is very similar to the win32 object format, but it produces 64-bit objects. same energy, bigger numbers. π
β XDF β
the XDF object format is essentially a simplified version of COFF. it's a multi-section relocatable format that supports 64-bit physical and virtual addresses. understated, but it does the job. π€
π SEE ALSO π
go read those next, bestie, they're literally right there. π«Ά
πΈ AUTHOR πΈ
Peter Johnson <peter@tortall.net>
- Author.
π COPYRIGHT π
Copyright Β© 2006 Peter Johnson
and that's the whole page!! π this one came from the Yasm manual, dated February 2007, and it lives at page YASM_OBJFMTS(7) β so if you ever need to find it again, that's the address. periodt. πβ¨
π¦ where this page comes from
- alpine 3.24: yasm-doc 1.3.0-r4 Β· BSD-2-Clause
- arch rolling: yasm 1.3.0-9 Β· BSD-2-Clause OR BSD-3-Clause AND GPL-2.0-only AND LGPL-2.1-only AND Artistic-1.0-Perl
- debian bookworm: yasm 1.3.0-4
- debian trixie: yasm 1.3.0-7
- epel 10: yasm-devel 1.3.0^20250625git121ab15-1.el10_1 Β· BSD-2-Clause AND BSD-3-Clause AND (GPL-1.0-or-later AND GPL-2.0-or-later OR Artistic-1.0-Perl OR LGPL-2.0-or-later)
- epel 9: yasm-devel 1.3.0^20250625git121ab15-1.el9 Β· BSD-2-Clause AND BSD-3-Clause AND (GPL-1.0-or-later AND GPL-2.0-or-later OR Artistic-1.0-Perl OR LGPL-2.0-or-later)
- fedora 43: yasm-devel 1.3.0^20250625git121ab15-3.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND (GPL-1.0-or-later AND GPL-2.0-or-later OR Artistic-1.0-Perl OR LGPL-2.0-or-later)
- fedora 43: yasm-devel 1.3.0^20250625git121ab15-3.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND (GPL-1.0-or-later AND GPL-2.0-or-later OR Artistic-1.0-Perl OR LGPL-2.0-or-later)
- fedora 44: yasm-devel 1.3.0^20250625git121ab15-3.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND (GPL-1.0-or-later AND GPL-2.0-or-later OR Artistic-1.0-Perl OR LGPL-2.0-or-later)
- fedora 44: yasm-devel 1.3.0^20250625git121ab15-3.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND (GPL-1.0-or-later AND GPL-2.0-or-later OR Artistic-1.0-Perl OR LGPL-2.0-or-later)
- nixos 26.05: yasm 1.3.0
- nixpkgs unstable: yasm 1.3.0
- opensuse-leap 16.0: yasm 1.3.0-160000.2.2 Β· Artistic-1.0 AND BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-or-later AND LGPL-2.0-or-later
- opensuse-leap 16.0: yasm 1.3.0-160000.2.2 Β· Artistic-1.0 AND BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-or-later AND LGPL-2.0-or-later
- opensuse-leap 16.0: yasm 1.3.0-160000.2.2 Β· Artistic-1.0 AND BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-or-later AND LGPL-2.0-or-later
- opensuse-leap 16.0: yasm 1.3.0-160000.2.2 Β· Artistic-1.0 AND BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-or-later AND LGPL-2.0-or-later
- ubuntu jammy: yasm 1.3.0-2.1
- ubuntu noble: yasm 1.3.0-4
- ubuntu questing: yasm 1.3.0-7
- ubuntu resolute: yasm 1.3.0-8
- ubuntu stonking: yasm 1.3.0-8
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms