From: klr03 AT banshee DOT cs DOT uow DOT edu DOT au (Karl Leslie Rudd) Newsgroups: comp.os.msdos.djgpp Subject: Re: ld linker problems Date: 26 Nov 1996 03:03:22 +1100 Organization: University of Wollongong, NSW, Australia. Lines: 28 Message-ID: <57cg0a$72i@banshee.cs.uow.edu.au> References: <57afr7$4h5 AT fizban DOT solace DOT mh DOT se> NNTP-Posting-Host: banshee.cs.uow.edu.au To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp hs AT sbbs DOT se (Henrik) writes: >Hi everybody! >ld isn't playing the way I want it to... Assume I compile these two files: >---------- file1.cc >char silly_buffer[10000]; >---------- >---------- file2.cc >int main(void) >{ >} >---------- >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! [snip] >//HSe Add the -fconserve-space flag to your command line. :) Karl