Identifying external references

cs163wcw%sdcc10@ucsd.edu (Vegetable Man)
Thu, 14 Jun 90 03:30:42 GMT

          From comp.compilers

Related articles
Identifying external references cs163wcw%sdcc10@ucsd.edu (1990-06-14)
| List of all articles for this month |
Newsgroups: comp.compilers
From: cs163wcw%sdcc10@ucsd.edu (Vegetable Man)
Date: Thu, 14 Jun 90 03:30:42 GMT
Organization: University of California, San Diego
Keywords: External references, nm, yacc
Summary: Questions about when include files come in

A while ago, there was a question posted about identifying external
references, and someone came up with the elegant solution of using
nm, which as far as I can tell, identifies all function calls and
outputs them along with some other information. I'll look at the
man page for that, but I'm wondering if this trick wouldn't be too
late in the game for my project. I'm supposed to identify external
references in order to build custom include files with only the
necessary declarations. My questions:


Will this even reduce code size?
Can I use nm to do this, or has the compiler already drawn the
      necessary information in at compile time?
If nm is too late, is yacc my best alternative?


Thank you for any help in advance. Feel free to mail me directly
if my questions are too simple to bother the group with.
Matt
[I find nm cross references very useful, but they tell you very little
about functions defined and used within the same module. And, no, it is
unlikely to decrease code size unless as a side-effect you get rid of dead
code or data. -John]


--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.