aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bundle-libraries.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/bundle-libraries.sh b/scripts/bundle-libraries.sh
index bfe681ad60..620ee01bde 100755
--- a/scripts/bundle-libraries.sh
+++ b/scripts/bundle-libraries.sh
@@ -87,7 +87,11 @@ _runas_so() {
return 0;
}
+ #ifdef __APPLE__
+ __attribute__((section("__DATA,__mod_init_func")))
+ #else
__attribute__((section(".init_array")))
+ #endif
static void *mangle_arg0_constructor = &mangle_arg0;
EOT