Message-ID: <37F8713A.D24E11B8@maths.unine.ch> Date: Mon, 04 Oct 1999 10:19:54 +0100 From: Gautier X-Mailer: Mozilla 4.07C-SGI [en] (X11; I; IRIX64 6.5 IP30) MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Linker trimming unused code/data References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: hilbert.unine.ch Lines: 17 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > What you need to do is to divide a single module into several smaller > modules. Then the linker will only link in those modules which you > actually need in your program. Of course - but in fact (after some inquiry etc.) the `ld' linker is almost the only that can't do it itself! To circumvent this weakness, the people at GNAT have made a tool, gnatelim, that checks dependencies and rebuilds a program, putting in the .o's only the used parts. It's portable but very slow, and the object files are to be rebuilt for different project. This is why I wonder if there is no `ld++', that could e.g. obey to a linker directive file which says what is to be deleted... - Gautier _____\\________________\_______\ http://members.xoom.com/gdemont/