dlfcn init function, bug or feature?
H. J. Lu
hjl@lucon.org
Sat Jan 29 00:58:00 GMT 2005
On Fri, Jan 28, 2005 at 06:30:25PM +0100, Martin Schwidefsky wrote:
> Hi,
> I have trouble to understand how the init function in
> dlfcn/dlfcn.c is supposed to work. On s390* it is called
> via the __do_global_ctors_aux function which is called
> by _init of libdl.so. All these function do not have
> parameters nor do they return something. So this function
> definition:
>
> void
> __attribute__ ((constructor))
> init (int argc, char *argv[])
> {
> __dlfcn_argc = argc;
> __dlfcn_argv = argv;
> }
>
> doesn't make any sense to me. How can this possibly work?
> It crashes for me...
>
http://sources.redhat.com/ml/libc-alpha/2005-01/msg00116.html
H.J.
More information about the Libc-alpha
mailing list