2010-04-26 Geoff Norton <gnorton@novell.com>
authorGeoff Norton <grompf@sublimeintervention.com>
Mon, 26 Apr 2010 18:10:31 +0000 (18:10 -0000)
committerGeoff Norton <grompf@sublimeintervention.com>
Mon, 26 Apr 2010 18:10:31 +0000 (18:10 -0000)
        * processes.c: Fix this for 64-bit darwin.

svn path=/trunk/mono/; revision=156118

mono/io-layer/ChangeLog
mono/io-layer/processes.c

index 86b6d0fee3cca37e5e78abef290222e6afc7129f..6897a93044dc027bfd5e26d26353ec402b1a1711 100644 (file)
@@ -1,3 +1,7 @@
+2010-04-26  Geoff Norton  <gnorton@novell.com>
+
+       * processes.c: Fix this for 64-bit darwin.
+
 2010-04-20  Jonathan Pryor  <jpryor@novell.com>
 
        * collection.c: Cleanup platform checks around
index 1ea441a6f8132bd301c91d4ec5e7928ea474decb..57f6bab425211888e849077b8dd7d62869ae54e7 100644 (file)
@@ -1891,15 +1891,24 @@ static GSList *load_modules (void)
        int i = 0;
 
        for (i = 0; i < count; i++) {
+#if SIZEOF_VOID_P == 8
+               const struct mach_header_64 *hdr;
+               const struct section_64 *sec;
+#else
                const struct mach_header *hdr;
                const struct section *sec;
+#endif
                const char *name;
                intptr_t slide;
 
                slide = _dyld_get_image_vmaddr_slide (i);
                name = _dyld_get_image_name (i);
                hdr = _dyld_get_image_header (i);
+#if SIZEOF_VOID_P == 8
+               sec = getsectbynamefromheader_64 (hdr, SEG_DATA, SECT_DATA);
+#else
                sec = getsectbynamefromheader (hdr, SEG_DATA, SECT_DATA);
+#endif
 
                /* Some dynlibs do not have data sections on osx (#533893) */
                if (sec == 0) {