I know about global constructors, but if you look closely at libc-start.c
you will see that what I said is still true.
/* Register the destructor of the dynamic linker if there is any. */
if (rtld_fini != NULL)
__internal_atexit (rtld_fini);
/* Call the initializer of the libc. */
__libc_init_first (argc, argv, __environ);
/* Register the destructor of the program, if any. */
if (fini)
__internal_atexit (fini);
/* Call the initializer of the program, if any. */
if (init)
(*init) ();
The constructors you are worried about are all executed by (*init)().
We control the code executed by __libc_init_first, and in the current source
base none of it calls atexit. Therefore, we can be absolutely certain that
the above __internal_atexit calls are safe.
zw
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/