[comp.unix.i386] Out of symtab space

fredriks@kuling.UUCP (Fredrik Stax{ng) (07/27/90)

	We are doing a large project in C++ on Interactive Unix with
HCR/C++. We have came up against what evidently is a restriction in ld. It
aborts with the message "ld internal error: fatal: symbol table overflow".
I have tried the +e[01] options, but it only seems to make the problem 
worse. I can see some ways out this:

a) Get Interactive to raise the limit (or make it settable).
b) Use GNU.
c) Split it up in smaller modules.

a) only solves the problem on Interactive, and we have to port to some 
other Sys V boxes. For the same reason b) is not preferable either. So
I guess we have to do be, unless some genius comes up with another way.

Any takers?

-- 
Fredrik Stax{ng                | Unix is the last operating system. Any
CS Student@Uppsala University  | new will be strictly in the Unix tradition.
fredriks@kuling.docs.uu.se     |
(+46 18) 46 32 07              |

nvk@ddsw1.MCS.COM (Norman Kohn) (08/01/90)

In article <1598@kuling.UUCP> fredriks@kuling.UUCP (Fredrik Stax{ng) writes:
>
>	We are doing a large project in C++ on Interactive Unix with
>HCR/C++. We have came up against what evidently is a restriction in ld. It
>aborts with the message "ld internal error: fatal: symbol table overflow".

I have run into this on a large development project, both under
uport and Interactive.  A temporary fix, depending on how large
your project is, is to reduce the number of externally defined 
symbols.  
1) group modules to make subroutines static, when possible
2) group related global storage items into structures:
the addressing of foo.a and foo.b is done by offsets from foo,
so that 
	struct
		{ int a,b;} foo
generates one, not two, external symbols.  Your code may
become more readable and your symbol table size will shrink.
3) it may be possible to do a partial link of some modules
and delete those symbols that are not required to be external
to the module group: but I haven't managed to do this.

-- 
Norman Kohn   		| ...ddsw1!nvk
Chicago, Il.		| days/ans svc: (312) 650-6840
			| eves: (312) 373-0564