[OT] Executing code once on initialization of a .so file

2003-12-06 Thread Holger Rauch
Hi! Is it possible to include code in a .so that gets executed only once on initialization of a shared lib? If so, how can I do this (provided I use gcc -fPIC to compile the stuff and gcc -shared to link it together). Thanks in advance for any hints! Greetings, Holger -- To

Re: [OT] Executing code once on initialization of a .so file

2003-12-06 Thread J.H.M. Dassen (Ray)
On Sat, Dec 06, 2003 at 10:37:57 +0100, Holger Rauch wrote: Is it possible to include code in a .so that gets executed only once on initialization of a shared lib? AFAIK yes. The ELF binary format has a .init section for that purpose; see http://citeseer.nj.nec.com/lu95elf.html . If so, how