https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=115631
--- Comment #8 from Bryan Drewery <bdrew...@freebsd.org> --- *Very naive and untested*. It seems like we need something like this: diff --git lib/libc/stdlib/atexit.c lib/libc/stdlib/atexit.c index bc9ad3ebd7bf..8df6cd4e31b0 100644 --- lib/libc/stdlib/atexit.c +++ lib/libc/stdlib/atexit.c @@ -125,6 +125,8 @@ atexit_register(struct atexit_fn *fptr) return 0; } +extern void *__dso_handle __hidden; + /* * Register a function to be performed at exit. */ @@ -137,7 +139,7 @@ atexit(void (*func)(void)) fn.fn_type = ATEXIT_FN_STD; fn.fn_ptr.std_func = func; fn.fn_arg = NULL; - fn.fn_dso = NULL; + fn.fn_dso = __dso_handle; error = atexit_register(&fn); return (error); -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ freebsd-bugs@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"