[comp.sys.att] Problem with ld and string table

malevine@athena.mit.edu (Mark A Levine) (01/13/88)

I'm trying to bring up Kyoto Common Lisp on an AT&T 3B2/300 running
System V version 2.0.  However, I'm running into a problem when I try
to link all of the object files together.  The command I'm using to
link the object files is:

cc -o raw_kcl <all of the object files> -lm

There are some 100 or so object files to be linked.  When I try to run
this, I get the following error message (for example):

ld fatal: fail to write symbol name Lapplyhook in string table for file raw_kcl

I don't have any idea on what to do about this error.  I can work
around the problem by changing the offending name in all the sources
so that it is less than eight characters in length.  However, if I
then recompile and relink, I simply get the same error with a
different symbol name.  Given that there are 100 source files, trying
to shrink all of the file names is out of the question since I don't
know which names will be accepted and which will fail.  The only
common factor between the names in the error messages is that they are
more than eight characters long.  However, other names in the sources
longer than eight characters are apparently accepted without any
trouble.   

Has anyone come across this problem before?  Or, can anyone offer
information on fixing it or working around it?  If so, I would appreciate
any assistance you can provide.  Thanks in advance.


				Mark Levine

jcs@tarkus.UUCP (John C. Sucilla) (01/14/88)

In article <2244@bloom-beacon.MIT.EDU>, malevine@athena.mit.edu (Mark A Levine) writes:
> 
> I'm trying to bring up Kyoto Common Lisp on an AT&T 3B2/300 running
> System V version 2.0.  However, I'm running into a problem when I try
> to link all of the object files together.  The command I'm using to
> link the object files is:
> 
> cc -o raw_kcl <all of the object files> -lm
> 
> There are some 100 or so object files to be linked.  When I try to run
> this, I get the following error message (for example):
> 
> ld fatal: fail to write symbol name Lapplyhook in string table for file raw_kcl
> 

Linking a large number of .o's requires ld to be executed more than once.
You need to create intermediate output files that havent been stripped.
This means the symbol table has to be there when you do the final ld run.

Try this:

	ld 1/2 your .o's with the -r option and without the -s option
	ld the other 1/2 of your .o's with -r and without -s
	ld the two output files from the above two steps without -r

That should do it. If it doesnt, try 3 passes...

jeremyc@quad1.UUCP (01/23/88)

Another, perhaps easier method if you have to do large links frequently,
is to upgrade to an Issue 4 C compiler. 

I used to have problems when linking objects with around 2000 symbols 
until I got Issue 4, since then - no blowups.

-- 
______________________________________________________________________________
Jeremy Chatfield, Quadratron Systems (UK) Ltd.  ihnp4!psivax!quad1!jeremyc
						 mc0/ gould/
______________________________________________________________________________