[net.lang.c] Extra Extern, read all about it.

lvc@danews.UUCP (Larry Cipriani) (06/19/86)

I wrote:

>... extra, redundant, or unnecessary externs are allowed and don't
>matter, at least on my C compiler.

My C compilers are on 11/70's running CB/UNIX 2.3 (yet another AT&T
Unix system), and 3B[2/5/20]s running System 5 Release 2.

One problem that we ran into is that when one routine in a
single C source file (say file.c) with many routines is used,
the whole object file [/lib/lib1.a(file.o)] is loaded. That is all
the routines in file.c that weren't used, are loaded as well.

I believe it would be pretty difficult to write a loader to pick only
the relevant parts of the file.o.  Careful organization of subroutines
and files helped to reduce our disk usage by several thousand blocks.
One subroutine per file (when appropriate) would be the `optimal' solution,
but it becomes a maintenance nightmare.  Shared libraries are one way
I know that would help.
-- 

Larry Cipriani		AT&T Network Systems
danews!lvc		"Nothing is worse than an itch you can never scratch."