Peter N Lewis wrote:
Is there any way to combine .o files together to form a single object file that can still be linked in?
There are several ways to combine .o files into static libraries. Examples of such libraries are the gpc (libgpc.a) and gcc (libgcc.a) runtime libraries. See (1) page 22-23 of MachORuntime.pdf and (2) "man ld".
The reason I'd like this is that the Mac interfaces are made up of about 350 units, and each of them produce a .o file containing the init code (even though there is no implementation section).
The init code worries me also (see the thread about smart-linking). It would be interesting to know if the initialisation code does anything essential in an interfacing unit that only declares types, functions and procedures and that has no objects, no variables, no implementation section, etcetera.
Regards,
Adriaan van Os