You want your compiler to generate machine code directly. But program files are not just machine code — there is an executable file format, within which there is relocatable machine code & initialized data. For linux, there is a file format that covers both program files and object files: https://en.wikipedia.org/wiki/Executable_and_Linkable_Format
Typically, the compiler (and/or assembler), linker, and operating system loader form a pipeline that cooperates to reconstitute a program into memory for execution by the processor in the context of an operating system process. By the time the program runs, the location of all symbols is known and any references to symbols are converted from nominal references to numeric address references.
Each stage may be missing numeric address information, captured instead symbolically. Use of external symbols and otherwise unknown addresses requires relocation at various stages in that pipeline.
Beyond raw machine code & data, these file formats are capable of containing metadata about the program such as symbol imports & exports, relocations required, debugger-required information, etc..
See also https://en.wikipedia.org/wiki/Comparison_of_executable_file_formats
Otherwise you might be interested in JIT technology, where machine code is generated directly into memory for immediate execution, and thus there is no output file.