#include<stdio.h>#include<assert.h>intfooDone=0;// DSOs do not support pre-initialization functions.__attribute__((constructor))voidfooInit(){dprintf(1,"initialization function called in foo\n");assert(fooDone==0);fooDone++;}intisFooDone(){returnfooDone;}