This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sizeof(function) functionality


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]