delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/04/08:44:13

Message-ID: <37F8713A.D24E11B8@maths.unine.ch>
Date: Mon, 04 Oct 1999 10:19:54 +0100
From: Gautier <gautier DOT demontmollin AT maths DOT unine DOT ch>
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: <Pine DOT SUN DOT 3 DOT 91 DOT 991003115605 DOT 16555B-100000 AT is>
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019