Assembler creates object files as output, as the compiler does.
You link them for the same reason you use libraries. The linker is also what (usually) knows about the target executable formats.
However, there are assemblers that produce executable files directly, without the involvement of the linker. If memory is used, NASM can create several executable formats directly, and some older builds for MS-DOS (like A86) can work and work in the same way.
A simpler installation and a faster build cycle with them make them really convenient for beginners, but the requirement to put all the code in one module makes it much less suitable for larger projects.
source
share