Walk through the C compilation pipeline: preprocessor, compiler, assembler, and linker. Start with a normal hello world, inspect macros and generated assembly, and end by producing a running binary that has no main() function.
The final example just boils down to writing the whole program in assembly, doesn’t it? The C function just returns a pointer to a static string, which you might as well do in assembly yourself since it’s less code to do it that way (you can omit the whole function signature).
In any case, the article does a great job introducing the various compilation stages the C program goes through in order to become an executable.
The final example just boils down to writing the whole program in assembly, doesn’t it? The C function just returns a pointer to a static string, which you might as well do in assembly yourself since it’s less code to do it that way (you can omit the whole function signature).
In any case, the article does a great job introducing the various compilation stages the C program goes through in order to become an executable.