delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/01/21:30:29

Message-ID: <37F550CC.F8732E7@Maths.UniNe.CH>
Date: Sat, 02 Oct 1999 02:24:48 +0200
From: Gautier <Gautier DOT deMontmollin AT Maths DOT UniNe DOT CH>
X-Mailer: Mozilla 4.51 (Macintosh; I; PPC)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Linker trimming unused code/data
References: <199909301623 DOT TAA08201 AT ankara DOT Foo DOT COM>
NNTP-Posting-Host: mac13-42.unine.ch
Lines: 30
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> The well-done project is probably somewhere in between.

Thanks for this commentary about size of modules (or whatever
produces a .o file).
Since a good module is not too big, the question of
trimming unused code is indeed not too terrible (IMHO).
But as a module is a whole and can be used in many different
projects, it would be annoying to subdivide it
excessively, or for particular purposes, leading to
different versions of the same things floating around...

Hence, trimming can be useful, and some linkers _do_ it!
Two linkers I know that don't see object files as indivisible
and trim unused things:

* Borland Pascal (and surely Delphi) does it completely (code+data)
* Janus Ada (RR Software) does it, at least for code

But both use an own object file format, with much richer
informations than contained in a ASM/C - produced .o file.
These linkers were made surely 20 years after the first `ld'...

Beside it, someone said that M$ and Phar Lap linkers could do such
trimming too, for standard object files - to be verified...

-- 
Gautier

_____\\________________\_______\
http://members.xoom.com/gdemont/

- Raw text -


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