Fetch function names & prototypes?

codefixer@gmail.com
17 Oct 2005 00:28:42 -0400

          From comp.compilers

Related articles
Fetch function names & prototypes? codefixer@gmail.com (2005-10-17)
Re: Fetch function names & prototypes? touati@prism.uvsq.fr (TOUATI Sid) (2005-10-19)
| List of all articles for this month |

From: codefixer@gmail.com
Newsgroups: comp.compilers
Date: 17 Oct 2005 00:28:42 -0400
Organization: http://groups.google.com
Keywords: types, question

Hello:


I am trying to understand how do compiler writers fetch function names
and then verify if they are in compliance with their prototype. Is it
possible to construct a symbol table of just the functions used in a
project ?


Thanks.
[Of course it's possible to construct a symbol table of functions,
although in C++ the prototypes are found in the header files included
by each module so there's no need. There's also an old trick: encode
the argument types of each function as a byte string, put the byte
string into the object file symbol table, and have the linker compare
those byte strings and complain if they don't match. The linker doesn't
have to understand the types, just see if they match. -John]



Post a followup to this message

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