This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]