[launchd-changes] [23322] trunk/launchd/src/launchd.c

source_changes at macosforge.org source_changes at macosforge.org
Mon Jul 30 10:43:00 PDT 2007


Revision: 23322
          http://trac.macosforge.org/projects/launchd/changeset/23322
Author:   zarzycki at apple.com
Date:     2007-07-30 10:43:00 -0700 (Mon, 30 Jul 2007)

Log Message:
-----------
Force dyld to resolve certain symbols at launch rather than lazily.

Modified Paths:
--------------
    trunk/launchd/src/launchd.c

Modified: trunk/launchd/src/launchd.c
===================================================================
--- trunk/launchd/src/launchd.c	2007-07-30 15:15:12 UTC (rev 23321)
+++ trunk/launchd/src/launchd.c	2007-07-30 17:43:00 UTC (rev 23322)
@@ -179,6 +179,11 @@
 
 #define PID1_CRASH_LOGFILE "/var/log/launchd-pid1.crash"
 
+/* This hack forces the dynamic linker to resolve these symbols ASAP */
+static __attribute__((unused)) typeof(sync) *__junk_dyld_trick1 = sync;
+static __attribute__((unused)) typeof(sleep) *__junk_dyld_trick2 = sleep;
+static __attribute__((unused)) typeof(reboot) *__junk_dyld_trick3 = reboot;
+
 void
 fatal_signal_handler(int sig, siginfo_t *si, void *uap)
 {

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20070730/ebacc580/attachment.html


More information about the launchd-changes mailing list