Mail Archives: djgpp/1996/05/16/09:16:58
Date: Wed, 15 May 1996 23:12:42 -0400
From: dj AT delorie DOT com (DJ Delorie)
> Does 'ld' support function level linking ?
No. IBM's AIX linker does, but there's a lot of overhead involved.
> Would it be a good idea to support function level linking ?
Not for V2's libc, since we already manually split up the source files
to nearly eliminate unused functions from being linked in in the first
place. It's easier to write the code that way than to teach the
linker to fix it for you. Most code falls into one of two categories:
1. Part of a library. Manually split the code into many sources once,
and every user benefits.
2. Part of an application. Hey, you're going to use them all anyway
or you wouldn't have written them, right?
BTW one way to eliminate uncalled functions is to keep you granularity as fine
as possible, ie put only one function, or a few functions required together,
per source file and put everything into a library except main(). In this way
the linker CAN filter unreferenced functions for you. Just treat everything as
an application specific library.
--
Art S. Kagel, kagel AT quasar DOT bloomberg DOT com
A proverb is no proverb to you 'till life has illustrated it. -- John Keats
- Raw text -