This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: calling function in .init and .fini gives problem
- From: Diego Novillo <dnovillo at redhat dot com>
- To: mohanlal jangir <mohanlaljangir at hotmail dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Thu, 20 May 2004 11:24:55 -0400
- Subject: Re: calling function in .init and .fini gives problem
- Organization: Red Hat Canada
- References: <BAY16-DAV11QgHESeQB00011312@hotmail.com>
On Thu, 2004-05-20 at 10:40, mohanlal jangir wrote:
> I tried to run following program, but is giving "Illegal instruction" error
> after function premain is called. Can somebody correct me, what I am doing
> wrong?
>
Try __attribute__((constructor)) and __attribute__((destructor))
Diego.