Mail Archives: djgpp/1996/05/16/15:05:27
> Please reply in person, as I had to unsubscribe from djgpp group because of
> chronic email intray overload.
> In djgpp v1, and in djgpp v2, is there an option to tell the loader to tell
> me of any function entry points that are present but never used? This would be
> useful letting me weed out unused functions in a big multi-file program that I
> have developed and altered much.
>
I'm not *totally* sure about this, so I've posted it to the DJGPP
list as well, if I'm wrong, I'm sure someone will correct me.. =)
Anyways, as far as I know, the only way to do this is to get a list
of symbols (data/code identifiers) in the .exe, and compare the
profilling output (from gprof) to check which symbols are used.
However, you should put as many functions as poss. into a library
(.a) file -- that way, the linker won't include any modules whose functions
aren't used. It could be that only *functions* which are used (as
opposed to modules that are used) are included. But, if not, then the
only way to get rid of every extraneous function is to put them in
their own source module. I guess only functions which call each other, or
need to be called together should be in the same module.
--
Lee Braiden (lee_b AT celestia DOT dnet DOT co DOT uk)
<Celestia>
- Raw text -