All those .c files are converted into a single executable not by the compiler itself, but by the linker (ld) after the compiler is finished producing one .o file for each .c file.
As far as I know, there is no way to ask the compiler to compile all the .c files, producing assembly language output, and produce one assembly language file.
If this is really important to you, try one of two things. I'll give the more complex thing to try first, then the less complex.
The more complex thing:
Create an empty directory. Put in it a few .c files which, together, form a program. Put two functions in each one. Design the program so that when you run it, every function in every file gets called. (These can be very trivial functions.) Make sure that main() is defined in one and only one file.
Then compile these files and make sure the program runs.
Then compile these files with the -S option. The compiler will go as far as producing assembly language source and then stop.
Examine the assembly language files and see whether there's a way you can massage them into one assembly language file that you can do a "gcc" on and get a runnable program.
Then apply the lessons learned to your larger project.
If you choose to do this, then the yellow brick road you will be walking is a long, long yellow brick road.
The less complex thing:
Combine all your .c files into one .c file. Centralize all your #includes; no need to include any of them more than once. Get rid of any #include that includes one of those .c files you're combining. Compile the combined source file, just to make sure it actually compiles ok.
Then compile it with -s, and you have your source.
Hope this helps.
Last edited by firstname.lastname@example.org; 04-14-2007 at 08:43 AM.