[comp.lang.c] limits on externals

rob@akela.eng.ohio-state.edu (Rob Carriere) (09/27/90)

In article <1990Sep26.124303.10527@eua.ericsson.se> rv@erix.ericsson.se
(Robert Virding) writes: 
>>{eight character name limit}
>
>Agreed, but unfortunately C had/has to exist on systems which
>themselves limit the name length (in linkers and such). We could I
>suppose always say "don't run C on such systems".

Hmm...  `Replace the linker' seems somewhat more sensible.  Yes, I know about
systems where the linker cannot be supplanted.  In such a case, use the
following scheme:

C Compiler:   C  -->  `C' object format
`C' Linker:     `C' object format  --> system object format
System Linker: system object format  --> executable

The `C' Linker delivers a single object file with externals `main' plus any
system calls[1].  Since |main| < 6 this eliminates the problem.

SR
[1] that is, it also handles the C libraries, your personal libraries, etc.
Everything except some start-up code and the system calls.
---