diff options
author | Geoffrey Keating <geoffk@apple.com> | 2006-04-05 00:53:55 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2006-04-05 00:53:55 +0000 |
commit | b3c2c547989a7070295df1fc2dbe4cca62f40c61 (patch) | |
tree | 4d0ff70ec57912e6a515062f4f966d3248e4d6c8 | |
parent | 27b6c94094266d2eff8bc4502b98f7615ed2074d (diff) | |
download | gcc-b3c2c547989a7070295df1fc2dbe4cca62f40c61.zip gcc-b3c2c547989a7070295df1fc2dbe4cca62f40c61.tar.gz gcc-b3c2c547989a7070295df1fc2dbe4cca62f40c61.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/darwin-crt3.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3c2059a..98a9a52 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +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> * config/i386/i386.c (machopic_output_stub): Output \t diff --git a/gcc/config/darwin-crt3.c b/gcc/config/darwin-crt3.c index 1cbb4b5..65b7663 100644 --- a/gcc/config/darwin-crt3.c +++ b/gcc/config/darwin-crt3.c @@ -518,11 +518,15 @@ __cxa_atexit (cxa_atexit_callback func, void* arg, const void* dso) 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 atexit (atexit_callback func) { struct one_atexit_routine r; r.callback.ac = func; r.has_arg = 0; - return atexit_common (&r, NULL); + return atexit_common (&r, &__dso_handle); } |