www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/08/04:58:21

Date: Sun, 8 Nov 1998 11:58:29 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: djgpp AT delorie DOT com
Subject: Re: Issues making and using libs
In-Reply-To: <3641b902.1045843@news.cis.yale.edu>
Message-ID: <Pine.SUN.3.91.981108115805.12269D-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Thu, 5 Nov 1998, Mapson wrote:

> A majority of opinions seem to think
> that all the object code of libs gets dropped in in a link.

This is most definitely incorrect, not only with DJGPP, but with any
other linker I have ever seen.

> In the
> past I have wondered if it works by specific object modules in the
> archive. That is, if I have 7 different ".o" files comprising a lib, a
> call requiring code from one ".o" file simply takes that entire ".o"
> file's worth of code.

This is correct: most linkers link in entire object modules, they
cannot extract parts of object modules.  You need to make your object
modules as small and independent as possible.  If at all possible,
make every function be a separate module.

> >Did you strip the executables?  If not, the overhead of the debug info 
> >in the executable completely overshadows the actual amount of code.
> 
> The reason I don't strip these particular executables is because my
> understanding of stripping is that it removes debugging information.

No, it removes much more than that.  Try that, and I'm almost positive
you will see both executables get the same size.

- Raw text -


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