Date: Mon, 25 Nov 1996 07:17:17 +0200 (IST) From: Eli Zaretskii To: Henrik Cc: djgpp AT delorie DOT com Subject: Re: ld linker problems In-Reply-To: <57afr7$4h5@fizban.solace.mh.se> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sun, 24 Nov 1996, Henrik wrote: > and link them together with 'gcc file1.cc file2.cc', it turns out that the > 10000 bytes buffer is included in the final output file! Since the program > (the start of which is defined to be main(), of course) doesn't reference it, > I don't want it there! > > Obviously, ld is doing some kind of incremental linking here, and the only way > of solving it is by making file1.o a library and including it with -l. Obviously, you didn't look into the DJGPP FAQ list. This problem, the reason for this behavior of GCC, and the available work-around are described there in section 8.14.