This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
dlfcn init function, bug or feature?
- From: Martin Schwidefsky <schwidefsky at de dot ibm dot com>
- To: libc-alpha at sources dot redhat dot com
- Date: Fri, 28 Jan 2005 18:30:25 +0100
- Subject: dlfcn init function, bug or feature?
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...
blue skies,
Martin.