summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2006-04-05 00:53:55 +0000
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2006-04-05 00:53:55 +0000
commit9dc5f5cd81a0ca8653b4e12bc457259547735a7d (patch)
tree4d0ff70ec57912e6a515062f4f966d3248e4d6c8 /gcc/config
parent2c45c903b95a8079077eda8541829c954cdc2f7b (diff)
downloadgcc-9dc5f5cd81a0ca8653b4e12bc457259547735a7d.tar.gz
* config/darwin-crt3.c (atexit): Pass &__dso_handle rather than
NULL for dso parameter to atexit_common. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112692 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/darwin-crt3.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/config/darwin-crt3.c b/gcc/config/darwin-crt3.c
index 1cbb4b5fc2d..65b766369ee 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);
}