This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: dlfcn init function, bug or feature?
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Martin Schwidefsky <schwidefsky at de dot ibm dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Fri, 28 Jan 2005 16:58:53 -0800
- Subject: Re: dlfcn init function, bug or feature?
- References: <20050128173025.GA7037@mschwid3.boeblingen.de.ibm.com>
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.