Dynamic Loading

Frank Mehnert fm3 at os.inf.tu-dresden.de
Fri Sep 17 11:52:13 CEST 2004

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.

## Dept. of Computer Science, Dresden University of Technology, Germany ##
## http://os.inf.tu-dresden.de/~fm3                                     ##
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/20040917/78878e9a/attachment.sig>

More information about the l4-hackers mailing list