Subject: ld 'n stuff
To: None <current-users@NetBSD.ORG>
From: Eric Haszlakiewicz <haszlaki@UAccess.NET>
List: current-users
Date: 10/27/1997 21:32:21
	I've recently run into a problem with the size of ld getting extemely
large and eventually getting killed by a signal when swap space runs out.  
I've been linking everything with libgnumalloc and I think this might be
part of the problem.  I don't know exactly what's going on but if I simply
add -lgnumalloc to the LDADD line in my mk.conf it gets added onto everything
including libgnumalloc when it gets rebuilt.  If this happens then anything
which tries to link with the newly installed gnumalloc sits there and I
assume it's trying to repeatedly link in gnumalloc, hence the large process
size.  (If this isn't quite right and someone knows what really happens I
would love an explanation).  Anyway, assuming that ld is working fine and
it's just a bad idea to link a library into itself, how about a different
LDADD type think which works only for libraries.  (i.e. change bsd.lib.mk)
Of course you might still want to link most libraries with gnumalloc so
this wouldn't work all that well.  Ideally it would be nice if ld noticed
recursive linking (if that's what is happening) and DTRT.  How hard would
that be to do?  Is it supposed to do that->it currently has a bug?

eric
erh@uaccess.net