limits on externals (Was: Seven Original Sins of K&R)

Rob Carriere rob at akela.eng.ohio-state.edu
Thu Sep 27 06:26:24 AEST 1990


In article <1990Sep26.124303.10527 at eua.ericsson.se> rv at 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.
---



More information about the Comp.lang.c mailing list