Commit b3c2c547 by Geoffrey Keating Committed by Geoffrey Keating

darwin-crt3.c (atexit): Pass &__dso_handle rather than NULL for dso parameter to atexit_common.

	* config/darwin-crt3.c (atexit): Pass &__dso_handle rather than
	NULL for dso parameter to atexit_common.

From-SVN: r112692
parent 27b6c940
2006-04-04 Geoffrey Keating <geoffk@apple.com>
* config/darwin-crt3.c (atexit): Pass &__dso_handle rather than
NULL for dso parameter to atexit_common.
2006-04-04 Eric Christopher <echristo@apple.com> 2006-04-04 Eric Christopher <echristo@apple.com>
* config/i386/i386.c (machopic_output_stub): Output \t * config/i386/i386.c (machopic_output_stub): Output \t
......
...@@ -518,11 +518,15 @@ __cxa_atexit (cxa_atexit_callback func, void* arg, const void* dso) ...@@ -518,11 +518,15 @@ __cxa_atexit (cxa_atexit_callback func, void* arg, const void* dso)
int atexit (atexit_callback func) __attribute__((visibility("hidden"))); int atexit (atexit_callback func) __attribute__((visibility("hidden")));
/* Use __dso_handle to allow even bundles that call atexit() to be unloaded
on 10.4. */
extern void __dso_handle;
int int
atexit (atexit_callback func) atexit (atexit_callback func)
{ {
struct one_atexit_routine r; struct one_atexit_routine r;
r.callback.ac = func; r.callback.ac = func;
r.has_arg = 0; r.has_arg = 0;
return atexit_common (&r, NULL); return atexit_common (&r, &__dso_handle);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment