calling function in .init and .fini gives problem
Janis Johnson
janis187@us.ibm.com
Thu May 20 16:40:00 GMT 2004
On Thu, May 20, 2004 at 08:10:35PM +0530, 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?
>
> int __attribute__((__section__(".init"))) premain(void) {
>
> static int __attribute__((__section__(".fini"))) postmain(void) {
See function attributes "constructor" and "destructor" in the GCC Manual.
Janis
More information about the Gcc
mailing list