I'm primarily interested in popular and widely used compilers, such as gcc. But if things are done differently with different compilers, I'd like to know that, too.
Taking gcc as an example, does it compile a short program written in C directly to machine code, or does it first translate it to human-readable assembly, and only then uses an (in-built?) assembler to translate the assembly program into binary, machine code -- a series of instructions to the CPU?
Is using assembly code to create a binary executable a significantly expensive operation? Or is it a relatively simple and quick thing to do?
(Let's assume we're dealing with only the x86 family of processors, and all programs are written for Linux.)
I'd be very grateful for any help and thought on the matter. Thank you!