Hi Leon,
On Friday 17 September 2004 10:39, Leon wrote:
I have a library that I load dynamically which uses __attribute__((constructor)) and __attribute__((destructor)). I compile the library with MODE=l4env which has compile option "-nostdlib". This disables the attributes and thus no initial and final code being executed when the library is loaded and unloaded. In fact all MODES has this option.
That has nothing to do with -nostdlib. The program loader has to interpret the ctors/dtors section of the shared library.
Q1: Any suggestions how-to enable the con/destructor while keeping the MODE=l4env setting?
Static constructors/destructors are currently supported by the L4 loader. Note that shared library support of the L4 loader is very experimental. If you need static constructors/destructors you will have to switch to static libraries.
Frank