summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-04-26 16:04:37 +0200
committerJo-Philipp Wich <jo@mein.io>2018-04-26 16:06:55 +0200
commit746c590882b96d5ed4d4115e4bdab4c838af7806 (patch)
tree7e44f4012817b7f6b16e11287f7354fb8fbfa89c /scripts
parent044e84fa8a914eb48f517c2f2905a9a806c2ad30 (diff)
downloadmtk-20170518-746c590882b96d5ed4d4115e4bdab4c838af7806.zip
mtk-20170518-746c590882b96d5ed4d4115e4bdab4c838af7806.tar.gz
mtk-20170518-746c590882b96d5ed4d4115e4bdab4c838af7806.tar.bz2
scripts: bundle-libraries: fix build on OS X (FS#1493)
This allegedly fixes compilation of the library bundler preload library on Apple OS X. The resulting executables have not been runtime tested due to a lack of suitable test hardware. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
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 bfe681a..620ee01 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