When you compile a unit, the Free Pascal compiler generates 2 files:
The assembly language file contains the actual source code for the statements in your unit, and the necessary memory allocations for any variables you use in your unit. This file is converted by the assembler to an object file (with extension .o) which can then be linked to other units and your program, to form an executable.
By default, the assembly file is removed after it has been compiled. Only in the case of the -s command line option, the assembly file will be left on disk, so the assembler can be called later. You can disable the erasing of the assembler file with the -a switch.
The unit file contains all the information the compiler needs to use the unit:
The detailed contents and structure of this file are described in appendix A, on page 680. You can examine a unit description file using the ppudump program, which shows the contents of the file.
If you want to distribute a unit without source code, you must provide both the unit description file and the object file.
You can also provide a C header file to go with the object file. In that case, your unit can be used by someone who wishes to write his programs in C. However, you must make this header file yourself since the Free Pascal compiler doesn’t make one for you.