I have some C source files and I am using gcc. I basically want to compile all of them and create one single object file. When I try:
gcc
gcc -c src
To combine multiple source files into a single object file (at least since gcc 4.1), use the compiler/linker option --combine
(edit) later replaced with the compiler option -flto, with linking automatic depending on the compilation state: Requirements to use flto