OSDN Git Service

Fix by Martin Schlemmer:
[uclinux-h8/uclibc-ng.git] / libc / misc / internals / __uClibc_main.c
index 6f74e39..53bb028 100644 (file)
@@ -161,6 +161,16 @@ void attribute_hidden (*__app_fini)(void) = NULL;
 
 void attribute_hidden (*__rtld_fini)(void) = NULL;
 
+#ifdef _DL_FINI_CRT_COMPAT
+void attribute_hidden (*__dl_fini)(void) = NULL;
+
+void _set__dl_fini(void *fini_func)
+{
+       if (fini_func != NULL)
+               __dl_fini = fini_func;
+}
+#endif
+
 /* __uClibc_start_main is the new main stub for uClibc. This function is
  * called from crt0 (version 0.9.16 or newer), after ALL shared libraries
  * are initialized, just before we call the application's main function.