This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: sizeof(function) functionality
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: Kristis Makris <kristis dot makris at asu dot edu>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 07 Jul 2003 12:55:16 -0300
- Subject: Re: sizeof(function) functionality
- Organization: GCC Team, Red Hat
- References: <1057532809.6361.55.camel@syd.monet.net>
On Jul 6, 2003, Kristis Makris <kristis.makris@asu.edu> wrote:
> Other than instantiating a volatile variable right after a function and
> evaluating variable - &funcname, is there another way of retrieving the
> size a function occupies in memory using gcc ?
First, this won't get what you want, because variable will likely be
placed in a different section. I can't think of any clean way to do
this in C, especially if you consider functions-as-sections as a
possibility.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer